source: branches/gsoc11-statistics/base/src/cregistry/sqlext.c @ 140222

Last change on this file since 140222 was 66034, checked in by jmr@…, 10 years ago

missed a use of a type provided by sqlite3ext.h

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 894 bytes
Line 
1#if HAVE_CONFIG_H
2#include <config.h>
3#endif
4
5#include "vercomp.h"
6
7#include <string.h>
8#if HAVE_SQLITE3EXT_H
9#include <sqlite3ext.h>
10SQLITE_EXTENSION_INIT1
11#else
12#include <sqlite3.h>
13#endif
14
15/**
16 * Extension for sqlite3 defining collates being used in our DB. This can be
17 * used by any sqlite3 client to load the required collates.
18 *
19 * @param [in] db         database connection
20 * @param [out] pzErrMsg  error messages string
21 * @param [in] pApi       API methods
22 */
23int sqlite3_extension_init(
24    sqlite3 *db,          /* The database connection */
25    char **pzErrMsg UNUSED,      /* Write error messages here */
26#if HAVE_SQLITE3EXT_H
27    const sqlite3_api_routines *pApi  /* API methods */
28#else
29    const void *pApi
30#endif
31) {
32#if HAVE_SQLITE3EXT_H
33    SQLITE_EXTENSION_INIT2(pApi)
34
35    sqlite3_create_collation(db, "VERSION", SQLITE_UTF8, NULL, sql_version);
36#endif
37    return 0;
38}
Note: See TracBrowser for help on using the repository browser.