Home
last modified time | relevance | path

Searched refs:dbHandle (Results 1 - 25 of 33) sorted by relevance

12

/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/
H A Dsqlite_storage_engine.cpp54 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 Dsqlite_storage_executor.cpp23 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 Dsqlite_meta_executor.cpp21 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 Dsqlite_single_ver_storage_engine.h66 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 Dsqlite_local_storage_engine.cpp26 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 Dsqlite_single_ver_storage_engine.cpp322 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 Dsqlite_storage_executor.h26 SQLiteStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb);
33 int GetDbHandle(sqlite3 *&dbHandle) const;
H A Dsqlite_query_helper.h74 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 Dsqlite_meta_executor.h29 static int GetMetaKeysByKeyPrefix(const std::string &keyPre, sqlite3 *dbHandle, MetaMode metaMode, bool isMemDb,
34 static int GetExistsDevicesFromMeta(sqlite3 *dbHandle, MetaMode metaMode,
H A Dsqlite_local_storage_engine.h32 StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) override;
H A Dsqlite_query_helper.cpp400 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 Dsqlite_local_storage_executor.h27 SQLiteLocalStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb);
H A Dsqlite_storage_engine.h45 virtual StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) = 0;
H A Dsqlite_local_storage_executor.cpp40 SQLiteLocalStorageExecutor::SQLiteLocalStorageExecutor(sqlite3 *dbHandle, bool writable, bool isMemDb) in SQLiteLocalStorageExecutor() argument
41 : SQLiteStorageExecutor(dbHandle, writable, isMemDb) in SQLiteLocalStorageExecutor()
H A Dsqlite_single_ver_storage_executor.h30 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 Dnet_stats_sqlite_statement.cpp30 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 Drd_single_ver_storage_engine.h51 int GetDbHandle(bool isWrite, const SecurityOption &secOpt, GRD_DB *&dbHandle);
H A Drd_single_ver_storage_engine.cpp153 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 Dnet_stats_sqlite_statement.h35 int32_t Prepare(sqlite3 *dbHandle, const std::string &sql);
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/include/
H A Dsqlite_connection.h100 int RegDefaultFunctions(sqlite3 *dbHandle);
113 int LoadExtension(const RdbStoreConfig &config, sqlite3 *dbHandle);
H A Dsqlite_statement.h84 int Prepare(sqlite3 *dbHandle, const std::string &sql);
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/multiver/
H A Dmulti_ver_vacuum.cpp37 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 Dmulti_ver_vacuum.h71 int Launch(const std::string &dbIdentifier, MultiVerVacuumExecutor *dbHandle);
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/
H A Dsqlite_connection.cpp680 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 Dsqlite_single_relational_storage_engine.h64 StorageExecutor *NewSQLiteStorageExecutor(sqlite3 *dbHandle, bool isWrite, bool isMemDb) override;

Completed in 15 milliseconds

12