mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-28 18:32:38 +00:00
Minor cleanup to sqlite extension init.
This commit is contained in:
parent
304040d09c
commit
f1a88e4e71
@ -129,11 +129,7 @@ static void regexpFunc(sqlite3_context* context, int nArg, sqlite3_value** apArg
|
||||
sqlite3_result_int(context, std::regex_search(matchAgainst, *regex, kMatchFlags) ? 1 : 0);
|
||||
}
|
||||
|
||||
namespace musik { namespace core { namespace db {
|
||||
|
||||
namespace SqliteExtensions {
|
||||
|
||||
int Register(sqlite3* db) {
|
||||
static int regex_init(sqlite3* db) {
|
||||
static const struct Scalar {
|
||||
const char* zName; /* Function name */
|
||||
unsigned char nArg; /* Number of arguments */
|
||||
@ -155,6 +151,15 @@ namespace musik { namespace core { namespace db {
|
||||
0,
|
||||
0);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
namespace musik { namespace core { namespace db {
|
||||
|
||||
namespace SqliteExtensions {
|
||||
|
||||
int Register(sqlite3* db) {
|
||||
int rc = regex_init(db);
|
||||
if (rc != SQLITE_OK) {
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user