GPKGSqlLiteQueryBuilder

Objective-C

@interface GPKGSqlLiteQueryBuilder : NSObject

Swift

class GPKGSqlLiteQueryBuilder : NSObject

SQL Builder

  • Build SQL query

    Declaration

    Objective-C

    + (NSString *)buildQueryWithDistinct:(BOOL)distinct
                                andTable:(NSString *)table
                              andColumns:(NSArray<NSString *> *)columns
                                andWhere:(NSString *)where
                              andGroupBy:(NSString *)groupBy
                               andHaving:(NSString *)having
                              andOrderBy:(NSString *)orderBy
                                andLimit:(NSString *)limit;

    Swift

    class func buildQuery(withDistinct distinct: Bool, andTable table: String!, andColumns columns: [String]!, andWhere where: String!, andGroupBy groupBy: String!, andHaving having: String!, andOrderBy orderBy: String!, andLimit limit: String!) -> String!

    Parameters

    distinct

    true if distinct

    table

    table

    columns

    columns

    where

    where clause

    groupBy

    group by

    having

    having

    orderBy

    order by

    limit

    limit

    Return Value

    query sql

  • Build SQL query

    Declaration

    Objective-C

    + (NSString *)buildQueryWithDistinct:(BOOL)distinct
                               andTables:(NSArray<NSString *> *)tables
                              andColumns:(NSArray<NSString *> *)columns
                                andWhere:(NSString *)where
                              andGroupBy:(NSString *)groupBy
                               andHaving:(NSString *)having
                              andOrderBy:(NSString *)orderBy
                                andLimit:(NSString *)limit;

    Swift

    class func buildQuery(withDistinct distinct: Bool, andTables tables: [String]!, andColumns columns: [String]!, andWhere where: String!, andGroupBy groupBy: String!, andHaving having: String!, andOrderBy orderBy: String!, andLimit limit: String!) -> String!

    Parameters

    distinct

    true if distinct

    tables

    tables

    columns

    columns

    where

    where clause

    groupBy

    group by

    having

    having

    orderBy

    order by

    limit

    limit

    Return Value

    query sql

  • Append columns to the string

    Declaration

    Objective-C

    + (void)appendColumnsToString:(NSArray<NSString *> *)columns
                         toString:(NSMutableString *)string;

    Swift

    class func appendColumns(toString columns: [String]!, to string: NSMutableString!)

    Parameters

    columns

    columns

    string

    string