#import <ZIMDbConnection.h>
List of all members.
Detailed Description
- Discussion:
- This class represents an SQLite database connection.
- Updated:
- 2012-03-23
Member Function Documentation
- (NSNumber *) beginTransaction |
|
|
|
- Signature:
- close
- Discussion:
- This method will close an open database connection.
- Updated:
- 2011-07-16
- (int) columnTypeAtIndex: |
|
(int) |
column |
inStatement: |
|
(sqlite3_stmt *) |
statement |
|
|
| [implementation] |
- (id) columnValueAtIndex: |
|
(int) |
column |
withColumnType: |
|
(int) |
columnType |
inStatement: |
|
(sqlite3_stmt *) |
statement |
|
|
| [implementation] |
- (NSNumber *) commitTransaction |
|
|
|
- Signature:
- dataSource:execute:
- Discussion:
- This method will execute the specified SQL statement.
- Parameters:
-
dataSource | The file name of the database to be used. |
sql | The SQL statement to be used. |
- Returns:
- Either the last insert row id or TRUE.
- Updated:
- 2011-10-23
- See also:
- http://www.sqlite.org/c3ref/last_insert_rowid.html
- Signature:
- dataSource:query:
- Discussion:
- This method will query with the specified SQL statement.
- Parameters:
-
dataSource | The file name of the database to be used. |
sql | The SQL statement to be used. |
- Returns:
- The result set.
- Updated:
- 2011-10-23
+ (NSArray *) dataSource: |
|
(NSString *) |
dataSource |
query: |
|
(NSString *) |
sql |
asObject: |
|
(Class) |
model |
|
|
| |
- Signature:
- dataSource:query:
- Discussion:
- This method will query with the specified SQL statement.
- Parameters:
-
dataSource | The file name of the database to be used. |
sql | The SQL statement to be used. |
model | The class to used to map each record. The class only needs to have accessible instance variables and does not necessarily have to conform to the Active Record design pattern. |
- Returns:
- The result set.
- Updated:
- 2011-10-23
- Signature:
- dealloc
- Discussion:
- This method will free up the connection should it still remain open.
- Updated:
- 2012-03-21
- (NSNumber *) execute: |
|
(NSString *) |
sql |
|
- (instancetype) initWithDataSource: |
|
(NSString *) |
dataSource |
|
- Signature:
- initWithDataSource:
- Discussion:
- This constructor creates an instance of this class with the specified data source and will attempt to open a database connection. If the data source does not already exist in the working directoy, an attempt will be made to copy the data source from the resource directory to the working directory; otherwise, the data source will be created in the working directory.
- Parameters:
-
dataSource | The file name of the database's PLIST to be used. |
- Returns:
- An instance of this class.
- Updated:
- 2011-07-16
- (instancetype) initWithDataSource: |
|
(NSString *) |
dataSource |
withMultithreadingSupport: |
|
(BOOL) |
multithreading |
|
|
| |
- Signature:
- initWithDataSource:withMultithreadingSupport:
- Discussion:
- This constructor creates an instance of this class with the specified data source and will attempt to open a database connection. If the data source does not already exist in the working directoy, an attempt will be made to copy the data source from the resource directory to the working directory; otherwise, the data source will be created in the working directory.
- Parameters:
-
dataSource | The file name of the database's PLIST to be used. |
multithreading | This determines whether locks should be used. |
- Returns:
- An instance of this class.
- Updated:
- 2012-03-23
- Signature:
- isConnected
- Discussion:
- This method checks whether a database connection currently exists.
- Returns:
- Indicates whether a database connection exists.
- Updated:
- 2011-03-23
- Signature:
- open
- Discussion:
- This method will open a connection to the database.
- Updated:
- 2011-07-16
- Signature:
- query:
- Discussion:
- This method will query with the specified SQL statement and will map each record to an NSDictionary.
- Parameters:
-
sql | The SQL statement to be used. |
- Returns:
- The result set (i.e. an array of records).
- Updated:
- 2011-04-02
- (NSArray *) query: |
|
(NSString *) |
sql |
asObject: |
|
(Class) |
model |
|
|
| |
- Signature:
- query:asObject:
- Discussion:
- This method will query with the specified SQL statement and will map each record to the specified object (i.e. model).
- Parameters:
-
sql | The SQL statement to be used. |
model | The class to used to map each record. The class only needs to have accessible instance variables and does not necessarily have to conform to the Active Record design pattern. |
- Returns:
- The result set (i.e. an array of records).
- Updated:
- 2011-10-19
- (NSNumber *) rollbackTransaction |
|
|
|
- (SEL) selectorForSettingColumnName: |
|
(NSString *) |
column |
[implementation] |
- Signature:
- vacuum
- Discussion:
- The method will rebuild the entire database.
- Returns:
- Whether the command was successfully executed.
- Updated:
- 2011-06-30
- See also:
- http://www.sqlite.org/lang_vacuum.html
Member Data Documentation
- (NSLock*) _mutex [protected] |
The documentation for this class was generated from the following files: