Wrapper for a DB instance
Use instances of this class to load/store values
appendEntry |
appends the given entry to the end of the database
See Also:
- appendEntryWithTransaction:entryToAppend:resultingRecordNr:
- (BDBOperationStatus) appendEntryWithTransaction: (BDBTransaction *) transaction entryToAppend: (BDBDatabaseEntryData *) entryToAppend resultingRecordNr: (BDBDatabaseRecordNumber *) recordNr;
transaction
- transaction to use
entryToAppend
- value to add
recordNr
- will contain the record number after appending the value. The underlying database entry instance has to be instantiated by the caller. If nil is passed then no record number will be returned this way.
This method is only defined for one of the modes
,
appendEntryWithTransaction:entryToAppend:resultingRecordNr: |
appends the given entry to the end of the database
See Also:
- appendEntry
- (BDBOperationStatus) appendEntryWithTransaction: (BDBTransaction *) transaction entryToAppend: (BDBDatabaseEntryData *) entryToAppend resultingRecordNr: (BDBDatabaseRecordNumber *) recordNr;
transaction
- transaction to use
entryToAppend
- value to add
recordNr
- will contain the record number after appending the value. The underlying database entry instance has to be instantiated by the caller. If nil is passed then no record number will be returned this way.
This method is only defined for one of the modes
,
close |
- close;
Closes the database. After this call all settings related to the database are being invalidated. The previously hand-off configuration may be reused.
deleteEntryWithTransaction |
- deleteEntryWithTransaction:key:
- (BDBOperationStatus) deleteEntryWithTransaction:( BDBTransaction *) transaction key: (BDBDatabaseEntryData *) key;
transaction
key
- key specifying the entry to be deleted
In case of duplicate entries specified by the key all entries will be removed.
deleteEntryWithTransaction:key: |
- deleteEntryWithTransaction
- (BDBOperationStatus) deleteEntryWithTransaction:( BDBTransaction *) transaction key: (BDBDatabaseEntryData *) key;
transaction
key
- key specifying the entry to be deleted
In case of duplicate entries specified by the key all entries will be removed.
getEntryWithTransaction |
retriev a value by its record number
See Also:
- getEntryWithTransaction:recordNumber:data:
- (BDBOperationStatus) getEntryWithTransaction: (BDBTransaction *) transaction recordNumber: (BDBDatabaseRecordNumber *) recNo data: (BDBDatabaseEntryData *) data;
transaction
- underlying transaction. May equal nil
key
- key to look for
data
- entry to fill with the found data entry
getEntryWithTransaction:recordNumber:data: |
retriev a value by its record number
See Also:
- getEntryWithTransaction
- (BDBOperationStatus) getEntryWithTransaction: (BDBTransaction *) transaction recordNumber: (BDBDatabaseRecordNumber *) recNo data: (BDBDatabaseEntryData *) data;
transaction
- underlying transaction. May equal nil
key
- key to look for
data
- entry to fill with the found data entry
initWithFilename |
open a database with the given file name, database name and configuration.
See Also:
- initWithFilename:databaseName:databaseConfig:
+ (BDBDatabase *) initWithFilename: (NSString *) fileName databaseName: (NSString *) databaseName databaseConfig: (BDBDatabaseConfig *) aDbConfig;
fileName
- name of database file
databaseName
- name of database. Useful if multiple databases will be used within a single file. May equal nil. If nil is given during creation then subsequent calls with values different from nil will be ignored.
aDbConfig
- configuration parameters
Depending on the configuration the database may be created if not existent. Also, the configuration determines the kind of database to use.
initWithFilename:databaseName:databaseConfig: |
open a database with the given file name, database name and configuration.
See Also:
- initWithFilename
+ (BDBDatabase *) initWithFilename: (NSString *) fileName databaseName: (NSString *) databaseName databaseConfig: (BDBDatabaseConfig *) aDbConfig;
fileName
- name of database file
databaseName
- name of database. Useful if multiple databases will be used within a single file. May equal nil. If nil is given during creation then subsequent calls with values different from nil will be ignored.
aDbConfig
- configuration parameters
Depending on the configuration the database may be created if not existent. Also, the configuration determines the kind of database to use.
openCursor |
open and return a cursor used.
See Also:
- openCursor:cursorConfig:
- (BDBCursor *) openCursor: (BDBTransaction *) transaction cursorConfig: (BDBCursorConfig *) config;
transaction
- underlying transaction. May be nil
config
- settings for the cursor to be created ®result related cursor
openCursor:cursorConfig: |
open and return a cursor used.
See Also:
- openCursor
- (BDBCursor *) openCursor: (BDBTransaction *) transaction cursorConfig: (BDBCursorConfig *) config;
transaction
- underlying transaction. May be nil
config
- settings for the cursor to be created ®result related cursor
putDataWithTransaction:key:value: |
- (BDBOperationStatus) putDataWithTransaction: (BDBTransaction *) transaction key: (NSData *) key value: (NSData *) value;
key
- may not be null. The handling of duplicates depends on the the configuration previously being set.
value
- may not be null.
Stores an entry in the database
putEntryWithTransaction |
Stores an entry in the database.
See Also:
- putEntryWithTransaction:key:value:
- (BDBOperationStatus) putEntryWithTransaction: (BDBTransaction *) transaction key: (BDBDatabaseEntryData *) key value: (BDBDatabaseEntryData *) value;
key
- value for the key to be used. The handling of duplicates depends on the the configuration previously being set.
value
putEntryWithTransaction:key:value: |
Stores an entry in the database.
See Also:
- putEntryWithTransaction
- (BDBOperationStatus) putEntryWithTransaction: (BDBTransaction *) transaction key: (BDBDatabaseEntryData *) key value: (BDBDatabaseEntryData *) value;
key
- value for the key to be used. The handling of duplicates depends on the the configuration previously being set.
value
(Last Updated August 27, 2006)