Retrieves metadata about a specific column of a specific table of this database connection.
Arguments: |
The arguments are:
tableName [required] |
The name of the table containing the column whose metadata is being sought.
|
[required] |
The name of the column whose metadata is being sought.
|
results [required] |
ADirectoryobject whose indexes will hold the metadata on return. On
success the following indexes in the object will be valid:
DATATYPE |
The data type of the column.
|
COLLATIONSEQUNCE |
The name of the default collation sequence for the column.
|
NOTNULL |
True if the column has a NOT NULL constraint, otherwise false.
|
PRIMARYKEY |
True if the column is part of the PRIMARY KEY, otherwise false.
|
AUTOINCREMENT |
True if the column is AUTOINCREMENT, otherwise false.
|
|
dbName[optional] |
The Database Name of the database (main,temp, etc..) If this argument is omitted, then all attached databases are searched for the
table by the database engine, using the same algorithm as is used by SQLite to resolve unqualified table references.
|
|
Return value: |
Returns a SQLite result Result Code Constants , OK on success, otherwise an error code.
|
Remarks: |
If this methods fails, theresultsobject is unchanged.
If the specified table is actually a view, an error code is returned. If the specified column isrowid,oid, or_rowid_and an INTEGER PRIMARY KEY column has been explicitly declared, then the output
parameters are set for the explicitly declared column. If there is no explicitly declared INTEGER PRIMARY KEY column,
then the output parameters are set as follows:
-
Data type: "INTEGER"
-
Collation sequence: "BINARY"
-
Not null: false
-
Primary key: true
-
Auto increment false
|
Details: |
The functionality of thetableColumnMetadatamethod is similar to that of the SQLite
sqlite3_table_column_metadata API. Note that
the arguments totableColumnMetadataare in a slightly different order than in the
SQLite API. This is to place the optional database name at the end of the argument list.
|