-
Notifications
You must be signed in to change notification settings - Fork 0
DBCDatabaseInfo
#DBCDatabaseInfo Class Reference
[SQLitews]:http://www.sqlite.org
[APPLFastEnumerationProtocol]:http://developer.apple.com/library/ios/#documentation/cocoa/reference/NSFastEnumeration_protocol/Reference/NSFastEnumeration.html
[DBCDatabaseResultCR]:https://github.com/parfeon/DBConnect/wiki/DBCDatabaseResult
[DBCDatabaseCR]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase
[DBCDatabaseBasicExample]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase#basicExample
[DBCDatabaseDatabaseList]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase#m15
Overview
This class holds information about currently opened databases returned as a result of [databasesListError:][DBCDatabaseDatabaseList].
This class holds information about:
- databases' names
- sequence number among other databases
- path to database source
##Tasks
###DBCDatabaseInfo initialization
+ databaseInfoWithSequence:name:filePath:
- initDatabaseInfoWithSequence:name:filePath:
###DBCDatabaseRow properties
numberInSequence
name
filePath
##Properties
This property stores information about the database's sequence number.
@property (nonatomic, readonly, getter = numberInSequence)int dbSeqNumber
Return value
Database's sequence number.
Discussion
This number can be used to determine which database was attached one after another and in what order.
This property stores information about the database's name.
@property (nonatomic, readonly, getter = name)NSString *dbName
Return value
Database's name.
Discussion
This is the name which was used during database attachment or main.
This property stores information about database's source.
@property (nonatomic, readonly, getter = filePath)NSString *dbFilePath
Return value
The path to the database's source .
Discussion
Database can have different types of sources: file, "", :memory:. Last two won't have any value in this property.
##Class methods
databaseInfoWithSequence:name:filePath:
Create and initialize DBCDatabaseInfo instance with sequence number, name and source path.
+ (id)databaseInfoWithSequence:(int)sequenceNumber name:(NSString*)databaseName
filePath:(NSString*)pathToDatabaseFile
Parameters
sequenceNumber
[SQLite][SQLitews] database's sequence number among other databases.
databaseName
Database's name.
pathToDatabaseFile
The path or file of database's source.
Return value
Autoreleased DBCDatabaseInfo instance.
Discussion
This method creates and initialize DBCDatabaseInfo instance which stores information about single database attached/created at current database connection.
See Also
- initDatabaseInfoWithSequence:name:filePath:
##Instance methods
initDatabaseInfoWithSequence:name:filePath:
Initialize DBCDatabaseInfo instance with sequence number, name and source path.
- (id)initDatabaseInfoWithSequence:(int)sequenceNumber name:(NSString*)databaseName
filePath:(NSString*)pathToDatabaseFile
Parameters
sequenceNumber
[SQLite][SQLitews] database's sequence number among other databases.
databaseName
Database's name.
pathToDatabaseFile
The path or file of database's source.
Return value
Initialized DBCDatabaseInfo instance.
Discussion
This method creates and initializes DBCDatabaseInfo instance which stores information about single database attached/created at current database connection.