logo

SQLite C Interface: Obtain Aggregate Function Context

日期:2008-02-19 01:05 , 点击:269 , 分类:Sqlite教程
相关标签:aggregate_context,



SQLite C Interface

Obtain Aggregate Function Context

void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);

The implementation of aggregate SQL functions use this routine to allocate a structure for storing their state. The first time the sqlite3_aggregate_context() routine is is called for a particular aggregate, SQLite allocates nBytes of memory zeros that memory, and returns a pointer to it. On second and subsequent calls to sqlite3_aggregate_context() for the same aggregate function index, the same buffer is returned. The implementation of the aggregate can use the returned buffer to accumulate data.

SQLite automatically frees the allocated buffer when the aggregate query concludes.

The first parameter should be a copy of the SQL function context that is the first parameter to the callback routine that implements the aggregate function.

This routine must be called from the same thread in which the aggregate SQL function is running.

See also lists of Objects, Constants, and Functions.



SQLite C Interface: Obtain Aggregate Function Context 评论

# 昵称:

# 邮箱:

# 标题:

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

    



站内搜索




* 匹配全部


热门排行


最新内容



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

Powered By xydw.com Page Loaded in:0.930664s