1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Add a new interface, sqlite3_context_db_handle(), that returns the database

connection pointer for an application-defined function. (CVS 4889)

FossilOrigin-Name: 54c55cae556af5a16c0ce8be1a96d2932db80ad8
This commit is contained in:
drh
2008-03-19 21:45:51 +00:00
parent f39d958829
commit fa4a4b9159
13 changed files with 126 additions and 52 deletions

View File

@@ -413,6 +413,15 @@ void *sqlite3_user_data(sqlite3_context *p){
return p->pFunc->pUserData;
}
/*
** Extract the user data from a sqlite3_context structure and return a
** pointer to it.
*/
sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
assert( p && p->pFunc );
return p->s.db;
}
/*
** The following is the implementation of an SQL function that always
** fails with an error message stating that the function is used in the