dear UNIDAC team:
Since sqlite has function to get metadata of table:
int sqlite3_table_column_metadata(
sqlite3 *db, /* Connection handle */
const char *zDbName, /* Database name or NULL */
const char *zTableName, /* Table name */
const char *zColumnName, /* Column name */
char const **pzDataType, /* OUTPUT: Declared data type */
char const **pzCollSeq, /* OUTPUT: Collation sequence name */
int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
int *pPrimaryKey, /* OUTPUT: True if column part of PK */
int *pAutoinc /* OUTPUT: True if column is auto-increment */
);
why unidac can't get the information correctly?
About Sqlite metadata of table
Re: About Sqlite metadata of table
Please specify exactly what information UniDAC retrieves incorrect.
Re: About Sqlite metadata of table
Sorry I'm not descript the detail:
I use TUniMetaData to get metadata of sqlite table;
First, I use MetaDataKind := 'Columns' to get the column information.
Then, I use MetaDataKind := 'Constraints' to get the primary key information.
last, I use MetaDataKind := 'IndexColumns' to get the primary key detail information.
but, in sqlite, I can't get the primary key information in second step!
Maybe I got the wrong method?
I use TUniMetaData to get metadata of sqlite table;
First, I use MetaDataKind := 'Columns' to get the column information.
Then, I use MetaDataKind := 'Constraints' to get the primary key information.
last, I use MetaDataKind := 'IndexColumns' to get the primary key detail information.
but, in sqlite, I can't get the primary key information in second step!
Maybe I got the wrong method?
Re: About Sqlite metadata of table
We detected the error when getting metadata when MetaDataKind := 'Constraints'. It will be fixed in the next build.