MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / sqlite3_snapfn_init

Function sqlite3_snapfn_init

tensorflow/core/lib/db/snapfn.cc:215–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213#endif
214
215SQLITE_CALLBACK int sqlite3_snapfn_init(sqlite3* db, const char** /*pzErrMsg*/,
216 const sqlite3_api_routines* pApi) {
217 SQLITE_EXTENSION_INIT2(pApi);
218 int rc;
219
220 rc = sqlite3_create_function_v2(
221 db,
222 "snap", // zFunctionName
223 1, // nArg
224 SQLITE_UTF8 | SQLITE_DETERMINISTIC, // eTextRep
225 nullptr, // pApp
226 snap, // xFunc
227 nullptr, // xStep
228 nullptr, // xFinal
229 nullptr // xDestroy
230 );
231 if (rc != SQLITE_OK) {
232 return rc;
233 }
234
235 rc = sqlite3_create_function_v2(
236 db,
237 "unsnap", // zFunctionName
238 1, // nArg
239 SQLITE_UTF8 | SQLITE_DETERMINISTIC, // eTextRep
240 nullptr, // pApp
241 unsnap, // xFunc
242 nullptr, // xStep
243 nullptr, // xFinal
244 nullptr // xDestroy
245 );
246 if (rc != SQLITE_OK) {
247 return rc;
248 }
249
250 return SQLITE_OK;
251}
252
253} // extern "C"

Callers 1

OpenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected