/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/ |
H A D | sqlite_storage_engine.cpp | 54 StorageExecutor *SQLiteStorageEngine::NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) in NewSQLiteStorageExecutor() argument 56 return new (std::nothrow) SQLiteStorageExecutor(dbHandle, isWrite, isMemDb); in NewSQLiteStorageExecutor() 74 sqlite3 *dbHandle = nullptr; in CreateNewExecutor() local 75 int errCode = SQLiteUtils::OpenDatabase(option_, dbHandle); in CreateNewExecutor() 81 errCode = Upgrade(dbHandle); in CreateNewExecutor() 83 (void)sqlite3_close_v2(dbHandle); in CreateNewExecutor() 84 dbHandle = nullptr; in CreateNewExecutor() 87 SQLiteUtils::ExecuteCheckPoint(dbHandle); in CreateNewExecutor() 91 handle = NewSQLiteStorageExecutor(dbHandle, isWrite, isMemDb); in CreateNewExecutor() 94 (void)sqlite3_close_v2(dbHandle); in CreateNewExecutor() [all...] |
H A D | sqlite_storage_executor.cpp | 23 SQLiteStorageExecutor::SQLiteStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb) in SQLiteStorageExecutor() argument 25 dbHandle_(dbHandle), in SQLiteStorageExecutor() 47 int SQLiteStorageExecutor::GetDbHandle(sqlite3 *&dbHandle) const in GetDbHandle() 53 dbHandle = dbHandle_; in GetDbHandle()
|
H A D | sqlite_meta_executor.cpp | 21 int SqliteMetaExecutor::GetMetaKeysByKeyPrefix(const std::string &keyPre, sqlite3 *dbHandle, MetaMode metaMode, in GetMetaKeysByKeyPrefix() argument 39 int errCode = SQLiteUtils::GetStatement(dbHandle, sqlStr, statement); in GetMetaKeysByKeyPrefix() 94 int SqliteMetaExecutor::GetExistsDevicesFromMeta(sqlite3 *dbHandle, MetaMode metaMode, in GetExistsDevicesFromMeta() argument 97 int errCode = GetMetaKeysByKeyPrefix(DBConstant::DEVICEID_PREFIX_KEY, dbHandle, metaMode, isMemDb, devices); in GetExistsDevicesFromMeta() 102 errCode = GetMetaKeysByKeyPrefix(DBConstant::QUERY_SYNC_PREFIX_KEY, dbHandle, metaMode, isMemDb, devices); in GetExistsDevicesFromMeta() 107 errCode = GetMetaKeysByKeyPrefix(DBConstant::DELETE_SYNC_PREFIX_KEY, dbHandle, metaMode, isMemDb, devices); in GetExistsDevicesFromMeta()
|
H A D | sqlite_single_ver_storage_engine.h | 66 virtual StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) override; 101 int GetDbHandle(bool isWrite, const SecurityOption &secOpt, sqlite3 *&dbHandle); 102 int AttachMetaDatabase(sqlite3 *dbHandle, const OpenDbProperties &option) const; 104 int AttachMainDbAndCacheDb(sqlite3 *dbHandle, EngineState stateBeforeMigrate) const; 105 void RegisterFunctionIfNeed(sqlite3 *dbHandle) const; 106 int TryAttachMetaDb(const SecurityOption &existedSecOpt, sqlite3 *&dbHandle, bool &isAttachMeta,
|
H A D | sqlite_local_storage_engine.cpp | 26 StorageExecutor *SQLiteLocalStorageEngine::NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) in NewSQLiteStorageExecutor() argument 28 return new (std::nothrow) SQLiteLocalStorageExecutor(dbHandle, isWrite, isMemDb); in NewSQLiteStorageExecutor()
|
H A D | sqlite_single_ver_storage_engine.cpp | 322 int SQLiteSingleVerStorageEngine::AttachMainDbAndCacheDb(sqlite3 *dbHandle, EngineState stateBeforeMigrate) const in AttachMainDbAndCacheDb() argument 331 errCode = SQLiteUtils::AttachNewDatabase(dbHandle, option_.cipherType, option_.passwd, attachAbsPath, "cache"); in AttachMainDbAndCacheDb() 335 errCode = SQLiteUtils::AttachNewDatabase(dbHandle, option_.cipherType, option_.passwd, attachAbsPath, "maindb"); in AttachMainDbAndCacheDb() 378 sqlite3 *dbHandle = nullptr; in FinishMigrateData() local 379 errCode = handle->GetDbHandle(dbHandle); // use executor get sqlite3 handle to operating database in FinishMigrateData() 385 errCode = SQLiteUtils::ExecuteRawSQL(dbHandle, "DETACH 'cache'"); in FinishMigrateData() 552 StorageExecutor *SQLiteSingleVerStorageEngine::NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) in NewSQLiteStorageExecutor() argument 554 auto executor = new (std::nothrow) SQLiteSingleVerStorageExecutor(dbHandle, isWrite, isMemDb, executorState_); in NewSQLiteStorageExecutor() 616 int SQLiteSingleVerStorageEngine::GetDbHandle(bool isWrite, const SecurityOption &secOpt, sqlite3 *&dbHandle) in GetDbHandle() argument 618 int errCode = TryToOpenMainDatabase(isWrite, dbHandle); in GetDbHandle() 812 TryAttachMetaDb(const SecurityOption &existedSecOpt, sqlite3 *&dbHandle, bool &isAttachMeta, bool &isNeedDetachMeta) TryAttachMetaDb() argument 839 sqlite3 *dbHandle = nullptr; CreateNewExecutor() local 963 AttachMetaDatabase(sqlite3 *dbHandle, const OpenDbProperties &option) const AttachMetaDatabase() argument [all...] |
H A D | sqlite_storage_executor.h | 26 SQLiteStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb); 33 int GetDbHandle(sqlite3 *&dbHandle) const;
|
H A D | sqlite_query_helper.h | 74 int GetQuerySqlStatement(sqlite3 *dbHandle, bool onlyRowid, sqlite3_stmt *&statement); 75 int GetQuerySqlStatement(sqlite3 *dbHandle, const std::string &sql, sqlite3_stmt *&statement); 76 int GetCountSqlStatement(sqlite3 *dbHandle, sqlite3_stmt *&countStmt); 79 int GetQuerySyncStatement(sqlite3 *dbHandle, uint64_t beginTime, uint64_t endTime, sqlite3_stmt *&statement, 98 int GetRelationalMissQueryStatement(sqlite3 *dbHandle, uint64_t beginTime, uint64_t endTime, 102 int GetRelationalQueryStatement(sqlite3 *dbHandle, uint64_t beginTime, uint64_t endTime, 112 int GetCloudQueryStatement(bool useTimestampAlias, sqlite3 *dbHandle, std::string &sql, sqlite3_stmt *&statement); 114 int GetAndBindGidKvCloudQueryStatement(const std::string &user, sqlite3 *dbHandle, sqlite3_stmt *&stmt);
|
H A D | sqlite_meta_executor.h | 29 static int GetMetaKeysByKeyPrefix(const std::string &keyPre, sqlite3 *dbHandle, MetaMode metaMode, bool isMemDb, 34 static int GetExistsDevicesFromMeta(sqlite3 *dbHandle, MetaMode metaMode,
|
H A D | sqlite_local_storage_engine.h | 32 StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) override;
|
H A D | sqlite_query_helper.cpp | 400 int SqliteQueryHelper::GetQuerySqlStatement(sqlite3 *dbHandle, const std::string &sql, sqlite3_stmt *&statement) in GetQuerySqlStatement() argument 402 int errCode = SQLiteUtils::GetStatement(dbHandle, sql, statement); in GetQuerySqlStatement() 436 int SqliteQueryHelper::GetQuerySqlStatement(sqlite3 *dbHandle, bool onlyRowid, sqlite3_stmt *&statement) in GetQuerySqlStatement() argument 444 errCode = SQLiteUtils::GetStatement(dbHandle, sql, statement); in GetQuerySqlStatement() 475 int SqliteQueryHelper::GetCountSqlStatement(sqlite3 *dbHandle, sqlite3_stmt *&countStmt) in GetCountSqlStatement() argument 484 errCode = SQLiteUtils::GetStatement(dbHandle, countSql, countStmt); in GetCountSqlStatement() 583 int SqliteQueryHelper::GetQuerySyncStatement(sqlite3 *dbHandle, uint64_t beginTime, uint64_t endTime, in GetQuerySyncStatement() argument 599 errCode = SQLiteUtils::GetStatement(dbHandle, sql, statement); in GetQuerySyncStatement() 970 int SqliteQueryHelper::GetRelationalMissQueryStatement(sqlite3 *dbHandle, uint64_t beginTime, uint64_t endTime, in GetRelationalMissQueryStatement() argument 980 errCode = SQLiteUtils::GetStatement(dbHandle, sq in GetRelationalMissQueryStatement() 1062 GetRelationalQueryStatement(sqlite3 *dbHandle, uint64_t beginTime, uint64_t endTime, const std::vector<std::string> &fieldNames, sqlite3_stmt *&statement) GetRelationalQueryStatement() argument 1235 GetCloudQueryStatement(bool useTimestampAlias, sqlite3 *dbHandle, std::string &sql, sqlite3_stmt *&statement) GetCloudQueryStatement() argument 1339 GetAndBindGidKvCloudQueryStatement(const std::string &user, sqlite3 *dbHandle, sqlite3_stmt *&stmt) GetAndBindGidKvCloudQueryStatement() argument [all...] |
H A D | sqlite_local_storage_executor.h | 27 SQLiteLocalStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb);
|
H A D | sqlite_storage_engine.h | 45 virtual StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) = 0;
|
H A D | sqlite_local_storage_executor.cpp | 40 SQLiteLocalStorageExecutor::SQLiteLocalStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb) in SQLiteLocalStorageExecutor() argument 41 : SQLiteStorageExecutor(dbHandle, writable, isMemDb) in SQLiteLocalStorageExecutor()
|
H A D | sqlite_single_ver_storage_executor.h | 30 SQLiteSingleVerStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb); 31 SQLiteSingleVerStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb, ExecutorState executorState);
|
/foundation/communication/netmanager_base/services/netstatsmanager/src/ |
H A D | net_stats_sqlite_statement.cpp | 30 int32_t NetStatsSqliteStatement::Prepare(sqlite3 *dbHandle, const std::string &newSql) in Prepare() argument 37 int32_t errCode = sqlite3_prepare_v2(dbHandle, newSql.c_str(), newSql.length(), &stmt, nullptr); in Prepare()
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/gaussdb_rd/ |
H A D | rd_single_ver_storage_engine.h | 51 int GetDbHandle(bool isWrite, const SecurityOption &secOpt, GRD_DB *&dbHandle);
|
H A D | rd_single_ver_storage_engine.cpp | 153 int RdSingleVerStorageEngine::GetDbHandle(bool isWrite, const SecurityOption &secOpt, GRD_DB *&dbHandle) in GetDbHandle() argument 155 int errCode = TryToOpenMainDatabase(isWrite, dbHandle); in GetDbHandle()
|
/foundation/communication/netmanager_base/services/netstatsmanager/include/ |
H A D | net_stats_sqlite_statement.h | 35 int32_t Prepare(sqlite3 *dbHandle, const std::string &sql);
|
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/include/ |
H A D | sqlite_connection.h | 100 int RegDefaultFunctions(sqlite3 *dbHandle);
113 int LoadExtension(const RdbStoreConfig &config, sqlite3 *dbHandle);
|
H A D | sqlite_statement.h | 84 int Prepare(sqlite3 *dbHandle, const std::string &sql);
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/multiver/ |
H A D | multi_ver_vacuum.cpp | 37 int MultiVerVacuum::Launch(const std::string &dbIdentifier, MultiVerVacuumExecutor *dbHandle) in Launch() argument 43 if (dbIdentifier.empty() || dbHandle == nullptr) { in Launch() 50 dbMapVacuumTask_[dbIdentifier].databaseHandle = dbHandle; in Launch() 60 dbMapVacuumTask_[dbIdentifier].databaseHandle = dbHandle; in Launch()
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/include/ |
H A D | multi_ver_vacuum.h | 71 int Launch(const std::string &dbIdentifier, MultiVerVacuumExecutor *dbHandle);
|
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/ |
H A D | sqlite_connection.cpp | 680 int SqliteConnection::RegDefaultFunctions(sqlite3 *dbHandle) in RegDefaultFunctions() argument 682 if (dbHandle == nullptr) { in RegDefaultFunctions() 686 int errCode = sqlite3_create_function_v2(dbHandle, MERGE_ASSETS_FUNC, 2, SQLITE_UTF8 | SQLITE_DETERMINISTIC, in RegDefaultFunctions() 693 errCode = sqlite3_create_function_v2(dbHandle, MERGE_ASSET_FUNC, 2, SQLITE_UTF8 | SQLITE_DETERMINISTIC, nullptr, in RegDefaultFunctions() 1260 int SqliteConnection::LoadExtension(const RdbStoreConfig &config, sqlite3 *dbHandle) in LoadExtension() argument 1262 if (config.GetPluginLibs().empty() || dbHandle == nullptr) { in LoadExtension() 1269 int err = sqlite3_db_config(dbHandle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, SqliteUtils::ENABLE_LOAD_EXTENSION, in LoadExtension() 1283 err = sqlite3_load_extension(dbHandle, path.c_str(), nullptr, nullptr); in LoadExtension() 1286 sqlite3_errmsg(dbHandle), SqliteUtils::Anonymous(path).c_str()); in LoadExtension() 1290 int ret = sqlite3_db_config(dbHandle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSIO in LoadExtension() [all...] |
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/relational/ |
H A D | sqlite_single_relational_storage_engine.h | 64 StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) override;
|