-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
457 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <sqlite3ext.h> | ||
|
||
SQLITE_EXTENSION_INIT1 | ||
|
||
void fn(sqlite3_context* context ,int,sqlite3_value**){ | ||
sqlite3_result_int64(context, 43); | ||
} | ||
|
||
#ifdef _WIN32 | ||
__declspec(dllexport) | ||
#endif | ||
|
||
int sqlite_test_ext_init( | ||
sqlite3 *db, | ||
char **pzErrMsg, | ||
const sqlite3_api_routines *pApi | ||
){ | ||
int rc = SQLITE_OK; | ||
SQLITE_EXTENSION_INIT2(pApi); | ||
/* Insert here calls to | ||
** sqlite3_create_function_v2(), | ||
** sqlite3_create_collation_v2(), | ||
** sqlite3_create_module_v2(), and/or | ||
** sqlite3_vfs_register() | ||
** to register the new features that your extension adds. | ||
*/ | ||
sqlite3_create_function_v2(db,"testfn",0, SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC, 0, fn, 0, 0, 0); | ||
return rc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters