Skip to content

DBCDatabaseIndexInfo

parfeon edited this page Feb 7, 2012 · 2 revisions

#DBCDatabaseIndexInfo 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
[DBCDatabaseIndicesInfo]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase+Aliases#m16
Overview
This class holds information about table index which was retrieved as result of [indicesList:forTable:][DBCDatabaseIndicesInfo].
This class holds information about:

  • index sequence number
  • index name
  • whether index is unique or not

##Tasks
###DBCDatabaseIndexInfo initialization
+ indexInfoWithSequence:name:unique:
- initIndexInfoWithSequence:name:unique:
###DBCDatabaseIndexInfo properties
numberInSequence
name
isUnique

##Properties

numberInSequence

This property stores information about index sequence number among other indexes.

@property (nonatomic, readonly, getter = indexInIndex)int colIdxInIndex

Return value
Index sequence number among other indexes.

See Also
name
isUnique

Top


name

This property stores information about index name.

@property (nonatomic, readonly, getter = name)NSString *idxName

Return value
Index name.

See Also
numberInSequence
isUnique

Top


isUnique

This property stores information about index's uniqueness.

@property (nonatomic, readonly, getter = isUnique)BOOL idxUnique

Return value
YES if index is unique, otherwise - NO.

See Also
numberInSequence
name

Top

##Class methods

indexInfoWithSequence:name:unique:

Create and initialize DBCDatabaseIndexInfo instance with sequence number, name and flag, whether this index is unique or not.

+ (id)indexInfoWithSequence:(int)sequenceNumber name:(NSString*)indexName unique:(BOOL)isUnique

Parameters
sequenceNumber
    Index sequence order among other indices.
indexName
    Index name.
isUnique
    Whether index is unique.

Return value
Autoreleased DBCDatabaseIndexInfo instance.

Discussion
This method creates and initializes DBCDatabaseIndexInfo instance, which stored information about table's index.

See Also
- initIndexInfoWithSequence:name:unique:

Top

##Instance methods

initIndexInfoWithSequence:name:unique:

Initialize DBCDatabaseIndexInfo instance with sequence number, name and flag, whether this index is unique or not.

- (id)initIndexInfoWithSequence:(int)sequenceNumber name:(NSString*)indexName unique:(BOOL)isUnique

Parameters
sequenceNumber
    Index sequence order among other indexes.
indexName
    Index name.
isUnique
    Whether index is unique.

Return value
Initialized DBCDatabaseIndexInfo instance.

Discussion
This method creates and initializes DBCDatabaseIndexInfo instance, which stored information about table index.

See Also
+ indexInfoWithSequence:name:unique:

Top

Clone this wiki locally