SQLiteResultSet
SQLiteResultSet 是查询结果集对象,支持 next() 迭代与按列名/列索引读取数据。
实例成员 (Instance members)
Section titled “实例成员 (Instance members)”| 属性 | 类型 | 说明 |
|---|---|---|
query | string | 查询 SQL。 |
columnNameToIndexMap | object | 列名到索引的映射。 |
statement | SQLiteStatement | 关联的语句对象。 |
移动到下一行。
next(): booleanReturn Value:
boolean: 是否有下一行。
nextWithError
Section titled “nextWithError”移动到下一行并接收错误。
nextWithError(outErr: any): booleanParameters:
| Name | Type | Description |
|---|---|---|
outErr | any | 输出参数,接收错误。 |
Return Value:
boolean: 是否有下一行。
hasAnotherRow
Section titled “hasAnotherRow”是否还有下一行。
hasAnotherRow(): booleanReturn Value:
boolean: 是否还有行。
columnCount
Section titled “columnCount”列数。
columnCount(): numberReturn Value:
number: 列数。
columnIndexForName
Section titled “columnIndexForName”列名对应的索引。
columnIndexForName(name: string): numberParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
number: 列索引。
columnNameForIndex
Section titled “columnNameForIndex”索引对应的列名。
columnNameForIndex(index: number): stringParameters:
| Name | Type | Description |
|---|---|---|
index | number | 列索引。 |
Return Value:
string: 列名。
intForColumn
Section titled “intForColumn”按列名取 int。
intForColumn(name: string): numberParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
number: 整数值。
longForColumn
Section titled “longForColumn”按列名取 long。
longForColumn(name: string): numberParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
number: 长整值。
doubleForColumn
Section titled “doubleForColumn”按列名取 double。
doubleForColumn(name: string): numberParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
number: 双精度值。
stringForColumn
Section titled “stringForColumn”按列名取 string。
stringForColumn(name: string): stringParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
string: 字符串值。
dataForColumn
Section titled “dataForColumn”按列名取 NSData。
dataForColumn(name: string): NSDataParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
NSData: 数据值。
dateForColumn
Section titled “dateForColumn”按列名取日期。
dateForColumn(name: string): NSDateParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
NSDate: 日期值。
objectForKeyedSubscript
Section titled “objectForKeyedSubscript”按列名取值(下标访问)。
objectForKeyedSubscript(name: string): anyParameters:
| Name | Type | Description |
|---|---|---|
name | string | 列名。 |
Return Value:
any: 列值。
objectAtIndexedSubscript
Section titled “objectAtIndexedSubscript”按列索引取值(下标访问)。
objectAtIndexedSubscript(index: number): anyParameters:
| Name | Type | Description |
|---|---|---|
index | number | 列索引。 |
Return Value:
any: 列值。
resultDictionary
Section titled “resultDictionary”当前行转为字典(列名→值)。
resultDictionary(): NSDictionaryReturn Value:
NSDictionary: 当前行字典。
类成员 (Class members)
Section titled “类成员 (Class members)”当前运行时未额外暴露 SQLiteResultSet 的类成员。