SICIDatabaseImpl Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | SICIDatabaseImpl.h |
Overview
Exposes methods to deal with actual database object. It has methods to open, create, close, and execute query’s.
– openOrCreate:
required method
Open/Create the database through Database Descriptor.
- (void)openOrCreate:(SICDatabaseDescriptor *const)databaseDescriptor
Parameters
databaseDescriptor |
Database-Descriptor object which defines the schema of database. |
---|
Discussion
Open/Create the database through Database Descriptor.
By default add CREATE_IF_NECESSARY flag so that if database does not exist it will create.
Exceptions
SICDatabaseException |
If the database cannot be opened or create. |
---|
Declared In
SICIDatabaseImpl.h
– close:
required method
Close the existing opened database through Database Descriptor.
- (void)close:(SICDatabaseDescriptor *const)databaseDescriptor
Parameters
databaseDescriptor |
Database-Descriptor object which defines the schema of database. |
---|
Discussion
Close the existing opened database through Database Descriptor.
Exceptions
SICDatabaseException |
If the database cannot be closed. |
---|
Declared In
SICIDatabaseImpl.h
– executeQuery:entityDescriptor:query:
required method
Execute a single SQL statement that is NOT a SELECT or any other SQL statement that returns data.
- (void)executeQuery:(SICDatabaseDescriptor *const)databaseDescriptor entityDescriptor:(SICEntityDescriptor *const)entityDescriptor query:(NSString *const)query
Parameters
databaseDescriptor |
Database-Descriptor object which defines the schema of database. |
---|---|
entityDescriptor |
Entity-Descriptor object which defines the structure of table. |
query |
Query which needs to be executed. |
Discussion
Execute a single SQL statement that is NOT a SELECT or any other SQL statement that returns data.
It has no means to return any data (such as the number of affected rows). Instead, you’re encouraged to use insert, update, delete, when possible.
Exceptions
SICDatabaseException |
If any error occur while executing query provided. |
---|
Declared In
SICIDatabaseImpl.h
– executeBindQuery:entityDescriptor:query:columnValues:
required method
A pre-compiled statement that can be reused. The statement cannot return multiple rows, but 1x1 result sets are allowed.
- (void)executeBindQuery:(SICDatabaseDescriptor *const)databaseDescriptor entityDescriptor:(SICEntityDescriptor *const)entityDescriptor query:(NSString *const)query columnValues:(NSEnumerator *const)columnValues
Parameters
databaseDescriptor |
Database-Descriptor object which defines the schema of database. |
---|---|
entityDescriptor |
Entity-Descriptor object which defines the structure of table. |
query |
A pre-compiled statement. |
columnValues |
Column values |
Discussion
A pre-compiled statement that can be reused. The statement cannot return multiple rows, but 1x1 result sets are allowed.
Exceptions
SICDatabaseException |
If any error occur while inserting or updating tuple. |
---|
Declared In
SICIDatabaseImpl.h
– executeSelectQuery:entityDescriptor:query:
required method
Query the given table, returning a Cursor over the result set.
- (NSEnumerator *)executeSelectQuery:(SICDatabaseDescriptor *const)databaseDescriptor entityDescriptor:(SICEntityDescriptor *const)entityDescriptor query:(NSString *const)query
Parameters
databaseDescriptor |
Database-Descriptor object which defines the schema of database. |
---|---|
entityDescriptor |
Entity-Descriptor object which defines the structure of table. |
query |
Query based on which tuples will be fetched from database. |
Return Value
A Cursor object, which is positioned before the first entry. Note that Cursors are not synchronized, see the documentation for more details.
Discussion
Query the given table, returning a Cursor over the result set.
Exceptions
SICDatabaseException |
If any error occur while getting tuples from a single table. |
---|
Declared In
SICIDatabaseImpl.h
– executeMethod:parameter:
required method
Executes the method on database object.
- (void)executeMethod:(NSString *const)methodName parameter:(id const)parameter
Parameters
methodName |
Name Of Database Method. |
---|---|
parameters |
Parameters Needed By Database Method. |
Discussion
Executes the method on database object.
Exceptions
SICDatabaseException |
If any exeception occur which invoking method in database object. |
---|
Declared In
SICIDatabaseImpl.h