MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / sqlite3_regexp_init

Function sqlite3_regexp_init

modules/dasSQLITE/sqlite/shell.c:5432–5458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5430
5431#endif
5432int sqlite3_regexp_init(
5433 sqlite3 *db,
5434 char **pzErrMsg,
5435 const sqlite3_api_routines *pApi
5436){
5437 int rc = SQLITE_OK;
5438 SQLITE_EXTENSION_INIT2(pApi);
5439 (void)pzErrMsg; /* Unused */
5440 rc = sqlite3_create_function(db, "regexp", 2,
5441 SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
5442 0, re_sql_func, 0, 0);
5443 if( rc==SQLITE_OK ){
5444 /* The regexpi(PATTERN,STRING) function is a case-insensitive version
5445 ** of regexp(PATTERN,STRING). */
5446 rc = sqlite3_create_function(db, "regexpi", 2,
5447 SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
5448 (void*)db, re_sql_func, 0, 0);
5449#if defined(SQLITE_DEBUG)
5450 if( rc==SQLITE_OK ){
5451 rc = sqlite3_create_function(db, "regexp_bytecode", 1,
5452 SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
5453 0, re_bytecode_func, 0, 0);
5454 }
5455#endif /* SQLITE_DEBUG */
5456 }
5457 return rc;
5458}
5459
5460/************************* End ../ext/misc/regexp.c ********************/
5461#ifndef SQLITE_SHELL_FIDDLE

Callers 1

open_dbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected