MCPcopy Create free account
hub / github.com/2shady4u/godot-sqlite / dbdataGetEncoding

Function dbdataGetEncoding

src/sqlite/shell.c:18123–18133  ·  view source on GitHub ↗

** Attempt to figure out the encoding of the database by retrieving page 1 ** and inspecting the header field. If successful, set the pCsr->enc variable ** and return SQLITE_OK. Otherwise, return an SQLite error code. */

Source from the content-addressed store, hash-verified

18121** and return SQLITE_OK. Otherwise, return an SQLite error code.
18122*/
18123static int dbdataGetEncoding(DbdataCursor *pCsr){
18124 int rc = SQLITE_OK;
18125 int nPg1 = 0;
18126 u8 *aPg1 = 0;
18127 rc = dbdataLoadPage(pCsr, 1, &aPg1, &nPg1);
18128 if( rc==SQLITE_OK && nPg1>=(56+4) ){
18129 pCsr->enc = get_uint32(&aPg1[56]);
18130 }
18131 sqlite3_free(aPg1);
18132 return rc;
18133}
18134
18135
18136/*

Callers 1

dbdataFilterFunction · 0.85

Calls 2

dbdataLoadPageFunction · 0.85
get_uint32Function · 0.85

Tested by

no test coverage detected