Inherits from NSObject
Declared in KNYSyncDataStore.h

Overview

Methods to persist and retrieve the data from the local device database.

Tasks

Class Methods

sharedInstance

+ (instancetype)sharedInstance

Instance Methods

beginTransaction

Begin the database transaction

- (void)beginTransaction

Discussion

Begin the database transaction

Exceptions

KNYException

is Thrown, if any error occured during beginTransaction process

Declared In

KNYSyncDataStore.h

bulkDelete:

Delete the multiple rows from the database table This method will block the calling code until data is stored in database.

- (void)bulkDelete:(NSArray *)knySyncObjects

Parameters

knySyncObject

array of knySyncObjects(rows).

Discussion

Delete the multiple rows from the database table This method will block the calling code until data is stored in database.

Exceptions

KNYException

is Thrown, if any error occured during bulkDelete process

Declared In

KNYSyncDataStore.h

bulkDeleteInBackground:withCompletionBlock:

Delete the row from the database table This method saves the data asynchronously to the database.

- (void)bulkDeleteInBackground:(NSArray *)knySyncObjects withCompletionBlock:(KNYCompletionBlock)result

Parameters

knySyncObjects

array of knySyncObjects(rows).

void

(^KNYCompletionBlock)(NSError *error) result

Discussion

Delete the row from the database table This method saves the data asynchronously to the database.

Declared In

KNYSyncDataStore.h

bulkSave:

Saves the bulk rows into the corresponding database table.

- (void)bulkSave:(NSArray *)knySyncObjects

Parameters

knySyncObject

array of knySyncObjects(rows).

Discussion

Saves the bulk rows into the corresponding database table.

Exceptions

KNYException

is Thrown, if any error occured during bulkSave process

Declared In

KNYSyncDataStore.h

bulkSaveInBackground:withCompletionBlock:

Saves the bulk rows into the corresponding database table.

- (void)bulkSaveInBackground:(NSArray *)knySyncObjects withCompletionBlock:(KNYArrayResultBlock)result

Parameters

knySyncObjects

array of knySyncObjects(rows).

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error) result

Discussion

Saves the bulk rows into the corresponding database table.

Declared In

KNYSyncDataStore.h

commitTransaction

Commit the database transaction

- (void)commitTransaction

Discussion

Commit the database transaction

Exceptions

KNYException

is Thrown, if any error occured during commitTransaction process

Declared In

KNYSyncDataStore.h

createQuery

Create the query object to fetch the rows from the local database

- (KNYQuery *)createQuery

Return Value

return generic query object

Discussion

Create the query object to fetch the rows from the local database

Exceptions

KNYException

is Thrown, if any error occured during createQuery process

Declared In

KNYSyncDataStore.h

createQueryWithClassObj:

Create the query object to fetch the rows from the local database for a specific table.

- (KNYQuery *)createQueryWithClassObj:(Class)classObj

Parameters

classObj

classObj ([obj class])

Return Value

return specific query object for given class object

Discussion

Create the query object to fetch the rows from the local database for a specific table.

Exceptions

KNYException

is Thrown, if any error occured during createQueryWithClassObj process

Declared In

KNYSyncDataStore.h

deleteSyncObject:

Delete the row from the database table This method will block the calling code until data is stored in database.

- (void)deleteSyncObject:(KNYSyncObject *)knySyncObject

Parameters

knySyncObject

knySyncObject

Discussion

Delete the row from the database table This method will block the calling code until data is stored in database.

Exceptions

KNYException

is Thrown, if any error occured during deletion of syncobject

Declared In

KNYSyncDataStore.h

deleteSyncObjectByPK:primaryKey:

Delete the row from the database table with primaryKey.This method will block the calling code until data is stored in database.

- (void)deleteSyncObjectByPK:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

NSString

objectName

KNYPrimaryKey

primaryKey

Discussion

Delete the row from the database table with primaryKey.This method will block the calling code until data is stored in database.

Exceptions

KNYException

is Thrown, if any error occured during deletion of syncobject by primary key

Declared In

KNYSyncDataStore.h

deleteSyncObjectByPKInBackground:primaryKey:withCompletionBlock:

Delete the row from the database table with primaryKey.This method saves the data asynchronously to the database.

- (void)deleteSyncObjectByPKInBackground:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey withCompletionBlock:(KNYCompletionBlock)result

Parameters

NSString

objectName

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error) result

KNYPrimaryKey

primaryKey

Discussion

Delete the row from the database table with primaryKey.This method saves the data asynchronously to the database.

Declared In

KNYSyncDataStore.h

deleteSyncObjectByPKInBackgroundWithClassObject:primaryKey:withCompletionBlock:

Delete the row from the database table with primaryKey and class.This method saves the data asynchronously to the database.

- (void)deleteSyncObjectByPKInBackgroundWithClassObject:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey withCompletionBlock:(KNYCompletionBlock)result

Parameters

Class

classObj

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error) result

KNYPrimaryKey

primaryKey

Discussion

Delete the row from the database table with primaryKey and class.This method saves the data asynchronously to the database.

Declared In

KNYSyncDataStore.h

deleteSyncObjectByPKWithClassObject:primaryKey:

Delete the row from the database table with primaryKey and class.This method will block the calling code until data is stored in database.

- (void)deleteSyncObjectByPKWithClassObject:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

Class

classObj

KNYPrimaryKey

primaryKey

Discussion

Delete the row from the database table with primaryKey and class.This method will block the calling code until data is stored in database.

Exceptions

KNYException

is Thrown, if any error occured during deleteSyncObjectByPKWithClassObject by primary key

Declared In

KNYSyncDataStore.h

deleteSyncObjectInBackground:withCompletionBlock:

Delete the row from the database table This method saves the data asynchronously to the database.

- (void)deleteSyncObjectInBackground:(KNYSyncObject *)knySyncObject withCompletionBlock:(KNYCompletionBlock)result

Parameters

knySyncObject

knySyncObject

CompletionBlock

void (^KNYCompletionBlock)(NSError *error) result

Discussion

Delete the row from the database table This method saves the data asynchronously to the database.

Declared In

KNYSyncDataStore.h

executeQuery:

Runs the query and retrieve the rows.

- (NSArray *)executeQuery:(KNYQuery *)query

Parameters

query

KNYQuery object

Return Value

return array of knySyncObjects

Discussion

Runs the query and retrieve the rows.

Exceptions

KNYException

is Thrown, if any error occured during executeQuery process

Declared In

KNYSyncDataStore.h

executeQuery:withBindParams:

Description

- (NSArray *)executeQuery:(KNYQuery *)query withBindParams:(NSArray *)params

Parameters

query

KNYQuery object

params

params

Return Value

return array of knySyncObjects

Discussion

Description

Exceptions

KNYException

is Thrown, if any error occured during executeQueryWithBindParameters process

Declared In

KNYSyncDataStore.h

executeQueryInBackground:bindParams:CompletionBlock:

Runs the query and retrieve the rows in the background

- (void)executeQueryInBackground:(KNYQuery *)query bindParams:(NSArray *)params CompletionBlock:(KNYArrayResultBlock)result

Parameters

query

KNYQuery object

params

bindParameters

completionBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error) result

Discussion

Runs the query and retrieve the rows in the background

Declared In

KNYSyncDataStore.h

executeQueryInBackground:withCompletionBlock:

Runs the query and retrieve the rows in the background

- (void)executeQueryInBackground:(KNYQuery *)query withCompletionBlock:(KNYArrayResultBlock)result

Parameters

query

KNYQuery object

completionBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error) result

Discussion

Runs the query and retrieve the rows in the background

Declared In

KNYSyncDataStore.h

executeUpdate:

Runs the raw sql and retrieve the rows.

- (NSArray *)executeUpdate:(NSString *)sql

Parameters

sql

sqlQuery

Return Value

return array of KNYSyncObjects

Discussion

Runs the raw sql and retrieve the rows.

Exceptions

KNYException

is Thrown, if any error occured during executeUpdate process

Declared In

KNYSyncDataStore.h

executeUpdate:withBindParams:

Runs the raw sql with bind parameters and retrieve the rows.

- (NSArray *)executeUpdate:(NSString *)sql withBindParams:(NSArray *)bindParams

Parameters

sql

sqlQuery

bindParams

array of bind params to execute a query.

Return Value

return array of KNYSyncObjects

Discussion

Runs the raw sql with bind parameters and retrieve the rows.

Exceptions

KNYException

is Thrown, if any error occured during executeUpdateWithBindParams process

Declared In

KNYSyncDataStore.h

fetchDetails:

Retrieves all the field data for the object based on the primary key.

- (KNYSyncObject *)fetchDetails:(KNYSyncObject *)knySyncObject

Parameters

knySyncObject

knySyncObject

Return Value

return knySyncObject

Discussion

Retrieves all the field data for the object based on the primary key.

Exceptions

KNYException

is Thrown, if any error occured during fetchDetails process

Declared In

KNYSyncDataStore.h

fetchDetailsInBackground:completionBlock:

Retrieves all the field data for the object based on the primary key.

- (void)fetchDetailsInBackground:(KNYSyncObject *)knySyncObject completionBlock:(KNYSyncObjectResultBlock)result

Parameters

knySyncObject

knySyncObject

void

(^KNYSyncObjectResultBlock)(KNYSyncObject syncObject, NSError error) result

Discussion

Retrieves all the field data for the object based on the primary key.

Declared In

KNYSyncDataStore.h

getAll:

Retrieves all the rows from the table

- (NSArray *)getAll:(NSString *)tableName

Parameters

tableName

tableName

Return Value

return array of KNYSyncObjects

Discussion

Retrieves all the rows from the table

Exceptions

KNYException

is Thrown, if any error occured during getAll process

Declared In

KNYSyncDataStore.h

getAllInBackground:withCompletionBlock:

Retrieves all the rows from the table associated with the class.

- (void)getAllInBackground:(NSString *)tableName withCompletionBlock:(KNYArrayResultBlock)result

Parameters

tableName

tableName

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error) result

Discussion

Retrieves all the rows from the table associated with the class.

Declared In

KNYSyncDataStore.h

getAllWithClassObject:

Retrieves all the rows from the table associated with the class.

- (NSArray *)getAllWithClassObject:(Class)classObj

Parameters

classObj

classObj [obj class]

Return Value

return array of KNYSyncObjects

Discussion

Retrieves all the rows from the table associated with the class.

Exceptions

KNYException

is Thrown, if any error occured during getAllWithClassObject process

Declared In

KNYSyncDataStore.h

getAllWithClassObjectInBackground:withCompletionBlock:

Retrieves all the rows from the table associated with the class.

- (void)getAllWithClassObjectInBackground:(Class)classObj withCompletionBlock:(KNYArrayResultBlock)result

Parameters

classObj

classObj [obj class]

result

void (^KNYArrayResultBlock)(NSArray objects, NSError error)

Discussion

Retrieves all the rows from the table associated with the class.

Declared In

KNYSyncDataStore.h

getDeferredUploads:

Description

- (NSDictionary *)getDeferredUploads:(BOOL)allInstances

Parameters

BOOL

allInstances indicates all or unique instances

Return Value

NSDictonary dictionary containing information of rows

Discussion

Description

Retrieves the list of syncobjects row count that are set to hold at sync level

Exceptions

KNYException

is Thrown, if any error occured during getDeferredUploads process

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObject:withAllInstances:

Description

- (NSArray *)getDeferredUploadsForObject:(NSString *)objectName withAllInstances:(BOOL)allInstances

Parameters

NSString

objectName

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level

Exceptions

KNYException

is Thrown, if any error occured during getDeferredUploadsForObjectWithAllInstances process

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObject:withAllInstances:withColumns:

Description

- (NSArray *)getDeferredUploadsForObject:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns

Parameters

NSString

objectName

NSArray

columns

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level

Exceptions

KNYException

is Thrown, if any error occured during getDeferredUploadsForObjectWithAllInstancesWithColumns process

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObjectInBackground:withAllInstances:withArrayBlock:

Description

- (void)getDeferredUploadsForObjectInBackground:(NSString *)objectName withAllInstances:(BOOL)allInstances withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSString

objectName

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level in background

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObjectInBackground:withAllInstances:withColumns:withArrayBlock:

Description

- (void)getDeferredUploadsForObjectInBackground:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSString

objectName

NSArray

columns

BOOL

allInstances indicates all or unique instances

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level in background

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObjectInBackgroundWithClassObject:withAllInstances:withArrayBlock:

Description

- (void)getDeferredUploadsForObjectInBackgroundWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withArrayBlock:(KNYArrayResultBlock)result

Parameters

Class

classObj

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level in background with class

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObjectInBackgroundWithClassObject:withAllInstances:withColumns:withArrayBlock:

Description

- (void)getDeferredUploadsForObjectInBackgroundWithClassObject:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSArray

columns

BOOL

allInstances indicates all or unique instances

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

Class

classObj

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level in background with class

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObjectWithClassObject:withAllInstances:

Description

- (NSArray *)getDeferredUploadsForObjectWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances

Parameters

Class

classObj

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level with class

Exceptions

KNYException

is Thrown, if any error occured during getDeferredUploadsForObjectWithClassObjectWithAllInstances process

Declared In

KNYSyncDataStore.h

getDeferredUploadsForObjectWithClassObject:withAllInstances:withColumns:

Description

- (NSArray *)getDeferredUploadsForObjectWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns

Parameters

Class

classObj

NSArray

columns

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves the list of syncobjects that are set to hold at object level with class

Exceptions

KNYException

is Thrown, if any error occured during getDeferredUploadsForObjectWithClassObjectWithAllInstancesWithColumns process

Declared In

KNYSyncDataStore.h

getDeferredUploadsForScope:withAllInstances:

Description

- (NSDictionary *)getDeferredUploadsForScope:(NSString *)scopeName withAllInstances:(BOOL)allInstances

Parameters

NSString

scopeName

BOOL

allInstances indicates all or unique instances

Return Value

NSDictonary dictionary containing row count information

Discussion

Description

Retrieves the list of syncobjects row count that are set to hold at sync level.

Exceptions

KNYException

is Thrown, if any error occured during getDeferredUploadsForScopeWithAllInstances process

Declared In

KNYSyncDataStore.h

getDeferredUploadsForScopeInBackground:withAllInstances:withDictionaryBlock:

Description

- (void)getDeferredUploadsForScopeInBackground:(NSString *)scopeName withAllInstances:(BOOL)allInstances withDictionaryBlock:(KNYDictionaryResultBlock)result

Parameters

NSString

scopeName

KNYDictionaryResultBlock

void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error); @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves the list of syncobjects row count that are set to hold at sync level in background

Declared In

KNYSyncDataStore.h

getDeferredUploadsInBackground:withDictionaryBlock:

Description

- (void)getDeferredUploadsInBackground:(BOOL)allInstances withDictionaryBlock:(KNYDictionaryResultBlock)result

Parameters

KNYDictionaryResultBlock

void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error); result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves the list of syncobjects row count that are set to hold at sync level in background

Declared In

KNYSyncDataStore.h

getPendingAcknowledgements:

Description

- (NSDictionary *)getPendingAcknowledgements:(BOOL)allInstances

Parameters

BOOL

allInstances indicates all or unique instances

Return Value

NSDictonary dictionary containing information of rows

Discussion

Description

Retrieves all/distinct syncobjects row count at sync level that are waiting for acknowledgement from the Sync Server.

Exceptions

KNYException

is Thrown, if any error occured during getPendingAcknowledgements process

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObject:withAllInstances:

Description

- (NSArray *)getPendingAcknowledgementsForObject:(NSString *)objectName withAllInstances:(BOOL)allInstances

Parameters

NSString

objectName

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server

Exceptions

KNYException

is Thrown, if any error occured during getPendingAcknowledgementsForObjectWithAllInstances process

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObject:withAllInstances:withColumns:

Description

- (NSArray *)getPendingAcknowledgementsForObject:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns

Parameters

NSString

objectName

NSArray

columns

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server

Exceptions

KNYException

is Thrown, if any error occured during getPendingAcknowledgementsForObjectwithAllInstancesWithColumns process

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObjectInBackground:withAllInstances:withArrayBlock:

Description

- (void)getPendingAcknowledgementsForObjectInBackground:(NSString *)objectName withAllInstances:(BOOL)allInstances withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSString

objectName

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error) result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server in background

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObjectInBackground:withAllInstances:withColumns:withArrayBlock:

Description

- (void)getPendingAcknowledgementsForObjectInBackground:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSString

objectName

NSArray

columns

BOOL

allInstances indicates all or unique instances

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObjectInBackgroundWithClassObject:withAllInstances:withArrayBlock:

Description

- (void)getPendingAcknowledgementsForObjectInBackgroundWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withArrayBlock:(KNYArrayResultBlock)result

Parameters

Class

classObj

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error) result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server in background with class

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObjectInBackgroundWithClassObject:withAllInstances:withColumns:withArrayBlock:

Description

- (void)getPendingAcknowledgementsForObjectInBackgroundWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSArray

columns

BOOL

allInstances indicates all or unique instances

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

Class

classObj

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server with class

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObjectWithClassObject:withAllInstances:

Description

- (NSArray *)getPendingAcknowledgementsForObjectWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances

Parameters

Class

classObj

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server with the class

Exceptions

KNYException

is Thrown, if any error occured during getPendingAcknowledgementsForObjectWithClassObjectwithAllInstances process

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForObjectWithClassObject:withAllInstances:withColumns:

Description

- (NSArray *)getPendingAcknowledgementsForObjectWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns

Parameters

Class

classObj

NSArray

columns

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting for acknowledgement from the Sync Server with class

Exceptions

KNYException

is Thrown, if any error occured during getPendingAcknowledgementsForObjectWithClassObjectWithAllInstancesWithColumns process

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForScope:withAllInstances:

Description

- (NSDictionary *)getPendingAcknowledgementsForScope:(NSString *)scopeName withAllInstances:(BOOL)allInstances

Parameters

NSString

scopeName

BOOL

allInstances indicates all or unique instances

Return Value

NSDictonary dictionary containing row count information

Discussion

Description

Retrieves all/distinct syncobjects row count at scope level that are waiting for acknowledgement from the Sync Server.

Exceptions

KNYException

is Thrown, if any error occured during getPendingAcknowledgementsForScopeWithAllInstances process

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsForScopeInBackground:withAllInstances:withDictionaryBlock:

Description

- (void)getPendingAcknowledgementsForScopeInBackground:(NSString *)scopeName withAllInstances:(BOOL)allInstances withDictionaryBlock:(KNYDictionaryResultBlock)result

Parameters

NSString

scopeName

KNYDictionaryResultBlock

typedef void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error) result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects row count at scope level that are waiting for acknowledgement from the Sync Server in background

Declared In

KNYSyncDataStore.h

getPendingAcknowledgementsInBackground:withDictionaryResultBlock:

Description

- (void)getPendingAcknowledgementsInBackground:(BOOL)allInstances withDictionaryResultBlock:(KNYDictionaryResultBlock)result

Parameters

KNYDictionaryResultBlock

void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects row count at sync level that are waiting for acknowledgement from the Sync Server in background.

Declared In

KNYSyncDataStore.h

getPendingUploads:

Description

- (NSDictionary *)getPendingUploads:(BOOL)allInstances

Parameters

BOOL

allInstances indicates all or unique instances

Return Value

NSDictionary dictionary containing information of rows

Discussion

Description

Retrieves all/distinct syncobjects row count at sync level that are pending to be uploaded to the Sync Server.

Exceptions

KNYException

is Thrown, if any error occured during getPendingUploads process

Declared In

KNYSyncDataStore.h

getPendingUploadsForObject:withAllInstances:

Description

- (NSArray *)getPendingUploadsForObject:(NSString *)objectName withAllInstances:(BOOL)allInstances

Parameters

NSString

objectName

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server

Exceptions

KNYException

is Thrown, if any error occured during getPendingUploadsForObjectWithAllInstances process

Declared In

KNYSyncDataStore.h

getPendingUploadsForObject:withAllInstances:withColumns:

Description

- (NSArray *)getPendingUploadsForObject:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns

Parameters

NSString

objectName

NSArray

columns

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server

Exceptions

KNYException

is Thrown, if any error occured during getPendingUploadsForObjectWithAllInstancesWithColumns process

Declared In

KNYSyncDataStore.h

getPendingUploadsForObjectInBackground:withAllInstances:withArrayBlock:

Description

- (void)getPendingUploadsForObjectInBackground:(NSString *)objectName withAllInstances:(BOOL)allInstances withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSString

objectName

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server in background

Declared In

KNYSyncDataStore.h

getPendingUploadsForObjectInBackground:withAllInstances:withColumns:withArrayBlock:

Description

- (void)getPendingUploadsForObjectInBackground:(NSString *)objectName withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSString

objectName

NSArray

columns

BOOL

allInstances indicates all or unique instances

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server in background

Declared In

KNYSyncDataStore.h

getPendingUploadsForObjectInBackgroundWithClassObject:withAllInstances:withArrayBlock:

Description

- (void)getPendingUploadsForObjectInBackgroundWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withArrayBlock:(KNYArrayResultBlock)result

Parameters

Class

classObj

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server in background with class

Declared In

KNYSyncDataStore.h

getPendingUploadsForObjectInBackgroundWithClassObject:withAllInstances:withColumns:withArrayBlock:

Description

- (void)getPendingUploadsForObjectInBackgroundWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns withArrayBlock:(KNYArrayResultBlock)result

Parameters

NSArray

columns

BOOL

allInstances indicates all or unique instances

KNYArrayResultBlock

void (^KNYArrayResultBlock)(NSArray objects, NSError error)result @return

Class

class

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server in background with class

Declared In

KNYSyncDataStore.h

getPendingUploadsForObjectWithClassObject:withAllInstances:

Description

- (NSArray *)getPendingUploadsForObjectWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances

Parameters

Class

classObj

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server with class

Exceptions

KNYException

is Thrown, if any error occured during getPendingUploadsForObjectWithClassObjectWithAllInstances process

Declared In

KNYSyncDataStore.h

getPendingUploadsForObjectWithClassObject:withAllInstances:withColumns:

Description

- (NSArray *)getPendingUploadsForObjectWithClassObject:(Class)classObj withAllInstances:(BOOL)allInstances withColumns:(NSArray *)columns

Parameters

Class

classObj

NSArray

columns

BOOL

allInstances indicates all or unique instances

Return Value

NSArray array containining rows

Discussion

Description

Retrieves all/distinct syncobjects at object level that are waiting to be uploaded to the Sync Server with class

Exceptions

KNYException

is Thrown, if any error occured during getPendingUploadsForObjectWithClassObjectWithAllInstancesWithColumns process

Declared In

KNYSyncDataStore.h

getPendingUploadsForScope:withAllInstances:

Description

- (NSDictionary *)getPendingUploadsForScope:(NSString *)scopeName withAllInstances:(BOOL)allInstances

Parameters

NSString

scopeName

BOOL

allInstances indicates all or unique instances

Return Value

NSDictionary dictionary containing row count information

Discussion

Description

Retrieves all/distinct syncobjects row count at scope level that are pending to be uploaded to the Sync Server.

Exceptions

KNYException

is Thrown, if any error occured during getPendingUploadsForScopeWithAllInstances process

Declared In

KNYSyncDataStore.h

getPendingUploadsForScopeInBackground:withAllInstances:withDictionaryBlock:

Description

- (void)getPendingUploadsForScopeInBackground:(NSString *)scopeName withAllInstances:(BOOL)allInstances withDictionaryBlock:(KNYDictionaryResultBlock)result

Parameters

NSString

scopeName

KNYDictionaryResultBlock

void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects row count at scope level that are pending to be uploaded to the Sync Server.

Declared In

KNYSyncDataStore.h

getPendingUploadsInBackground:withDictionaryResultBlock:

Description

- (void)getPendingUploadsInBackground:(BOOL)allInstances withDictionaryResultBlock:(KNYDictionaryResultBlock)result

Parameters

KNYDictionaryResultBlock

void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error)result @return

BOOL

allInstances indicates all or unique instances

Discussion

Description

Retrieves all/distinct syncobjects row count at sync level that are pending to be uploaded to the Sync Server in background

Declared In

KNYSyncDataStore.h

getRowCount

Description

- (NSDictionary *)getRowCount

Return Value

sync objects row count

Discussion

Description

Retrieves sync objects row count present in local database

Exceptions

KNYException

is Thrown, if any error occured during getRowCountInBackground process

Declared In

KNYSyncDataStore.h

getRowCountForObject:

Description

- (NSNumber *)getRowCountForObject:(NSString *)objectName

Parameters

NSString

objectName

Return Value

row objects count

Discussion

Description

Retrieves sync objects row count for object present in local database

Exceptions

KNYException

is Thrown, if any error occured during getRowCountForObject process

Declared In

KNYSyncDataStore.h

getRowCountForObjectInBackground:withNumberBlock:

Description

- (void)getRowCountForObjectInBackground:(NSString *)objectName withNumberBlock:(KNYNumberResultBlock)result

Parameters

NSString

scopeName

KNYNumberResultBlock

void (^KNYNumberResultBlock)(NSNumber object, NSError error)result @return

Discussion

Description

Retrieves sync objects row count for scope present in local database in background

Declared In

KNYSyncDataStore.h

getRowCountForObjectInBackgroundWithClassObject:withNumberBlock:

Description

- (void)getRowCountForObjectInBackgroundWithClassObject:(Class)classObj withNumberBlock:(KNYNumberResultBlock)result

Parameters

Class

classObj

KNYNumberResultBlock

void (^KNYNumberResultBlock)(NSNumber object, NSError error)result @return

Discussion

Description

Retrieves sync objects row count for object present in local database with class in background

Declared In

KNYSyncDataStore.h

getRowCountForObjectWithClassObject:

Description

- (NSNumber *)getRowCountForObjectWithClassObject:(Class)classObj

Parameters

Class

classObj

Return Value

row objects count

Discussion

Description

Retrieves sync objects row count for object present in local database with class

Exceptions

KNYException

is Thrown, if any error occured during getRowCountForObjectWithClassObject process

Declared In

KNYSyncDataStore.h

getRowCountForScope:

Description

- (NSDictionary *)getRowCountForScope:(NSString *)scopeName

Parameters

NSString

scopeName

Return Value

sync objects row count

Discussion

Description

Retrieves sync objects row count for scope present in local database

Exceptions

KNYException

is Thrown, if any error occured during getRowCountForScope process

Declared In

KNYSyncDataStore.h

getRowCountForScopeInBackground:withDictionaryBlock:

Description

- (void)getRowCountForScopeInBackground:(NSString *)scopeName withDictionaryBlock:(KNYDictionaryResultBlock)result

Parameters

NSString

scopeName

KNYDictionaryResultBlock

void (^KNYDictionaryResultBlock)(NSDictionary objects, NSError error) result @return

Discussion

Description

Retrieves sync objects row count for scope present in local database in background

Declared In

KNYSyncDataStore.h

getRowCountInBackground:

Description

- (void)getRowCountInBackground:(KNYDictionaryResultBlock)result

Parameters

KNYDictionaryResultBlock

result

Return Value

sync objects row count

Discussion

Description

Retrieves sync objects row count present in local database in background

Exceptions

KNYException

is Thrown, if any error occured during getRowCountInBackground process

Declared In

KNYSyncDataStore.h

getSyncObject:primaryKey:

Retrieves sync object based on the primaryKey associated with object name. Returns nil if no object found.

- (KNYSyncObject *)getSyncObject:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

NSString

objectName

KNYPrimaryKey

primaryKey

Return Value

KNYSyncObject

Discussion

Retrieves sync object based on the primaryKey associated with object name. Returns nil if no object found.

Exceptions

KNYException

is Thrown, if any error occured during getSyncObjectPrimary process

Declared In

KNYSyncDataStore.h

getSyncObjectInBackground:primaryKey:completionBlock:

Retrieves sync object based on the primaryKey associated with object name in background.

- (void)getSyncObjectInBackground:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey completionBlock:(KNYSyncObjectResultBlock)result

Parameters

NSString

objectName

KNYSyncObjectResultBlock

void (^KNYSyncObjectResultBlock)(KNYSyncObject syncObject, NSError error) result

KNYPrimaryKey

primaryKey

Discussion

Retrieves sync object based on the primaryKey associated with object name in background.

Declared In

KNYSyncDataStore.h

getSyncObjectWithClass:primaryKey:

Retrieves sync object based on the primaryKey associated with class. Returns nil if no object found.

- (KNYSyncObject *)getSyncObjectWithClass:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

Class

classObj

KNYPrimaryKey

primaryKey

Return Value

knySyncObject

Discussion

Retrieves sync object based on the primaryKey associated with class. Returns nil if no object found.

Exceptions

KNYException

is Thrown, if any error occured during getSyncObjectWithClassPrimary process

Declared In

KNYSyncDataStore.h

getSyncObjectWithClassInBackground:primaryKey:completionBlock:

Retrieves sync object based on the primaryKey associated with class in background.

- (void)getSyncObjectWithClassInBackground:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey completionBlock:(KNYSyncObjectResultBlock)result

Parameters

Class

classObj

void

(^KNYSyncObjectResultBlock)(KNYSyncObject syncObject, NSError error) result

KNYPrimaryKey

primaryKey

Discussion

Retrieves sync object based on the primaryKey associated with class in background.

Declared In

KNYSyncDataStore.h

init

- (id)init

isTransactionActive

Tells whether the transaction is active or not

- (BOOL)isTransactionActive

Return Value

true when the transaction is active else false

Discussion

Tells whether the transaction is active or not

Exceptions

KNYException

is Thrown, if any error occured during isTransactionActive process

Declared In

KNYSyncDataStore.h

removeDeviceInstance:

Description

- (void)removeDeviceInstance:(KNYSyncObject *)knySyncObject

Parameters

KNYSyncObject

knySyncObject @return

Discussion

Description

Deletes sync object from local database.

Exceptions

KNYException

is Thrown, if any error occured during removeDeviceInstance process

Declared In

KNYSyncDataStore.h

removeDeviceInstanceByPK:primaryKey:

Description

- (void)removeDeviceInstanceByPK:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

NSString

objectName

KNYPrimaryKey

primaryKey @return

Discussion

Description

Deletes sync object from local database using primary key

Exceptions

KNYException

is Thrown, if any error occured during removeDeviceInstanceByPK process

Declared In

KNYSyncDataStore.h

removeDeviceInstanceByPKInBackground:primaryKey:completionBlock:

Description

- (void)removeDeviceInstanceByPKInBackground:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey completionBlock:(KNYCompletionBlock)result

Parameters

NSString

objectName

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error)result @return

KNYPrimaryKey

primaryKey

Discussion

Description

Deletes sync object from local database using primary key

Declared In

KNYSyncDataStore.h

removeDeviceInstanceByPKWithClassObject:primaryKey:

Description

- (void)removeDeviceInstanceByPKWithClassObject:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

Class

classObj

KNYPrimaryKey

primaryKey @return

Discussion

Description

Deletes sync object from local database using primary key with class

Exceptions

KNYException

is Thrown, if any error occured during removeDeviceInstanceByPKWithClassObjectPrimaryKey process

Declared In

KNYSyncDataStore.h

removeDeviceInstanceByPKWithClassObjectInBackground:primaryKey:completionBlock:

Description

- (void)removeDeviceInstanceByPKWithClassObjectInBackground:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey completionBlock:(KNYCompletionBlock)result

Parameters

Class

classObj

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error)result @return

KNYPrimaryKey

primaryKey

Discussion

Description

Deletes sync object from local database using primary key with class in background

Declared In

KNYSyncDataStore.h

removeDeviceInstanceInBackground:completionBlock:

Description

- (void)removeDeviceInstanceInBackground:(KNYSyncObject *)knySyncObject completionBlock:(KNYCompletionBlock)result

Parameters

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error)result @return

KNYSyncObject

knySyncObject

Discussion

Description

Deletes sync object from local database in background

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChanges

Description

- (void)rollbackPendingLocalChanges

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChanges process

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesByPK:primaryKey:

Description

- (void)rollbackPendingLocalChangesByPK:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

NSString

objectName

KNYPrimaryKey

primaryKey

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes using primary key

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChangesByPK process

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesByPKInBackground:primaryKey:withCompletionBlock:

Description

- (void)rollbackPendingLocalChangesByPKInBackground:(NSString *)objectName primaryKey:(KNYPrimaryKey *)primaryKey withCompletionBlock:(KNYCompletionBlock)result

Parameters

NSString

objectName

KNYCompletionBlock

typedef void (^KNYCompletionBlock)(NSError *error) result

KNYPrimaryKey

primaryKey

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes using primary key

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesByPKInBackgroundWithClassObject:primaryKey:withCompletionBlock:

Description

- (void)rollbackPendingLocalChangesByPKInBackgroundWithClassObject:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey withCompletionBlock:(KNYCompletionBlock)result

Parameters

Class

classObj

KNYCompletionBlock

typedef void (^KNYCompletionBlock)(NSError *error) result

KNYPrimaryKey

primaryKey

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes using primary key with class

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesByPKWithClassObject:primaryKey:

Description

- (void)rollbackPendingLocalChangesByPKWithClassObject:(Class)classObj primaryKey:(KNYPrimaryKey *)primaryKey

Parameters

Class

classObj

KNYPrimaryKey

primaryKey

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes using primary key with class

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChangesByPKWithClassObject process

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesForObject:

Description

- (void)rollbackPendingLocalChangesForObject:(NSString *)objectName

Parameters

NSString

objectName

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes at object level

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChangesForObject process

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesForObjectInBackground:withCompletionBlock:

Description

- (void)rollbackPendingLocalChangesForObjectInBackground:(NSString *)objectName withCompletionBlock:(KNYCompletionBlock)result

Parameters

NSString

objectName

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error) result

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes at object level in background

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesForObjectInBackgroundWithClassObject:withCompletionBlock:

Description

- (void)rollbackPendingLocalChangesForObjectInBackgroundWithClassObject:(Class)classObj withCompletionBlock:(KNYCompletionBlock)result

Parameters

Class

classObj

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error) result

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes at object level in background

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesForObjectWithClassObject:

Description

- (void)rollbackPendingLocalChangesForObjectWithClassObject:(Class)classObj

Parameters

Class

classObj

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes at object level with class

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChangesForObjectWithClassObject process

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesForScope:

Description

- (void)rollbackPendingLocalChangesForScope:(NSString *)scopeName

Parameters

NSString

scopeName

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes at scope level

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChangesForScope process

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesForScopeInBackground:withCompletionBlock:

Description

- (void)rollbackPendingLocalChangesForScopeInBackground:(NSString *)scopeName withCompletionBlock:(KNYCompletionBlock)result

Parameters

NSString

scopeName

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error)result

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes at scope level in background

Declared In

KNYSyncDataStore.h

rollbackPendingLocalChangesInBackground:

Description

- (void)rollbackPendingLocalChangesInBackground:(KNYCompletionBlock)result

Parameters

KNYCompletionBlock

void (^KNYCompletionBlock)(NSError *error) result

Discussion

Description

Resets the data to last synchronized state and undo all the client side changes in background

Exceptions

KNYException

is Thrown, if any error occured during rollbackPendingLocalChangesInBackground process

Declared In

KNYSyncDataStore.h

rollbackTransaction

Rollback the database transaction

- (void)rollbackTransaction

Discussion

Rollback the database transaction

Exceptions

KNYException

is Thrown, if any error occured during rollbackTransaction process

Declared In

KNYSyncDataStore.h

saveSyncObject:

Saves the row into the corresponding database table. This method will block the calling code until data is stored in database.

- (void)saveSyncObject:(KNYSyncObject *)knySyncObject

Parameters

knySyncObject

knySyncObject

Discussion

Saves the row into the corresponding database table. This method will block the calling code until data is stored in database.

Exceptions

KNYException

is Thrown, if any error occured during saving a syncobject

Declared In

KNYSyncDataStore.h

saveSyncObjectInBackground:withCompletionBlock:

Saves the row into the corresponding database table.

- (void)saveSyncObjectInBackground:(KNYSyncObject *)knySyncObject withCompletionBlock:(KNYSyncObjectResultBlock)result

Parameters

knySyncObject

knySyncObject

CompletionBlock

void (^KNYSyncObjectResultBlock)(KNYSyncObject syncObject, NSError error) result

Discussion

Saves the row into the corresponding database table.

Declared In

KNYSyncDataStore.h

setBusyTimeout:

Sets a busy handler that sleeps until database is unlocked or timeout expires

- (void)setBusyTimeout:(double)timeout

Parameters

double

timeout

Discussion

Sets a busy handler that sleeps until database is unlocked or timeout expires

Exceptions

KNYException

is Thrown, if any error occured while setting the busy timeout

Declared In

KNYSyncDataStore.h

setIntermediateUpdates:

Description

- (void)setIntermediateUpdates:(BOOL)value

Parameters

BOOL

value @return

Discussion

Description

This method turns intermediate update tracking on/off

Exceptions

KNYException

is Thrown, if any error occured during setIntermediateUpdates process

Declared In

KNYSyncDataStore.h