logo

SQLite C Interface: Declared Datatype Of A Query Result

日期:2008-01-16 13:26 , 点击:161 , 分类:SEO研究
相关标签:column_decltype,



SQLite C Interface

Declared Datatype Of A Query Result

const char *sqlite3_column_decltype(sqlite3_stmt *, int i);
const void *sqlite3_column_decltype16(sqlite3_stmt*,int);

The first parameter is a compiled SQL statement. If this statement is a SELECT statement and the Nth column of the returned result set of that SELECT is a table column (not an expression or subquery) then the declared type of the table column is returned. If the Nth column of the result set is an expression or subquery, then a NULL pointer is returned. The returned string is always UTF-8 encoded. For example, in the database schema:

CREATE TABLE t1(c1 VARIANT);

And the following statement compiled:

SELECT c1 + 1, c1 FROM t1;

Then this routine would return the string "VARIANT" for the second result column (i==1), and a NULL pointer for the first result column (i==0).

SQLite uses dynamic run-time typing. So just because a column is declared to contain a particular type does not mean that the data stored in that column is of the declared type. SQLite is strongly typed, but the typing is dynamic not static. Type is associated with individual values, not with the containers used to hold those values.

See also lists of Objects, Constants, and Functions.



SQLite C Interface: Declared Datatype Of A Query Result 评论

# 昵称:

# 邮箱:

# 标题:

* 请勿发布任何违反国家互联网相关法律法规的内容

    



站内搜索




* 匹配全部


热门排行


最新内容



Copyright © 2008 Sqlite中文实验室 版权所有
蜀ICP备08000081号 -

Powered By xydw.com Page Loaded in:0.198387s