Sha256: bca1fb3728e96ca6b7b34b1c05330c35f5bd1aa60ccab49716420ba4296763c2

Contents?: true

Size: 1.44 KB

Versions: 9

Compression:

Stored size: 1.44 KB

Contents

#import <Foundation/Foundation.h>


/**
 * A YapDatabaseQuery is used to pass SQL style queries into various extension classes.
 * The query that you pass represents everything after the SELECT clause of a query.
**/
@interface YapDatabaseQuery : NSObject

/**
 * A YapDatabaseQuery is everything after the SELECT clause of a query.
 * Methods that take YapDatabaseQuery parameters will prefix your query string similarly to:
 * 
 * fullQuery = @"SELECT rowid FROM 'database' " + [yapDatabaseQuery queryString];
 * 
 * Example 1:
 * 
 * query = [YapDatabaseQuery queryWithFormat:@"WHERE jid = ?", message.jid];
 * [secondaryIndex enumerateKeysAndObjectsMatchingQuery:query
 *                                           usingBlock:^(NSString *key, id object, BOOL *stop){
 *     ...
 * }];
 * 
 * Please note that you can ONLY pass objective-c objects as parameters.
 * Primitive types such as int, float, double, etc are NOT supported.
 * You MUST wrap these using NSNumber.
 * 
 * Example 2:
 *
 * query = [YapDatabaseQuery queryWithFormat:@"WHERE department = ? AND salary >= ?", dept, @(minSalary)];
 * [secondaryIndex enumerateKeysAndObjectsMatchingQuery:query
 *                                           usingBlock:^(NSString *key, id object, BOOL *stop){
 *     ...
 * }];
**/
+ (instancetype)queryWithFormat:(NSString *)format, ...;


@property (nonatomic, strong, readonly) NSString *queryString;
@property (nonatomic, strong, readonly) NSArray *queryParameters;

@end

Version data entries

9 entries across 3 versions & 1 rubygems

Version Path
motion-yapper-0.0.3 vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h
motion-yapper-0.0.3 vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h
motion-yapper-0.0.3 vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h
motion-yapper-0.0.2 vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h
motion-yapper-0.0.2 vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h
motion-yapper-0.0.2 vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h
motion-yapper-0.0.1 vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h
motion-yapper-0.0.1 vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h
motion-yapper-0.0.1 vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h