Home
last modified time | relevance | path

Searched refs:table (Results 1 - 25 of 63) sorted by relevance

123

/base/security/asset/services/db_operator/src/test/
H A Dtest_table.rs24 table::Table,
39 let table = Table::new("table_name", &db); in create_delete_table()
40 assert!(!table.exist().unwrap()); in create_delete_table()
41 assert!(table.create(columns).is_ok()); in create_delete_table()
42 assert!(table.exist().unwrap()); in create_delete_table()
43 table.delete().unwrap(); in create_delete_table()
55 let table = Table::new("table_name", &db); in table_restore()
56 table in table_restore()
59 let count = table.insert_row(&DbMap::from([("Id", Value::Number(1))])).unwrap(); in table_restore()
75 let table in table_restore()
[all...]
/base/hiviewdfx/hiview/plugins/usage_event_report/cache/
H A Devent_db_helper.cpp102 int EventDbHelper::InsertSysUsageEvent(std::shared_ptr<LoggerEvent> event, const std::string& table) in InsertSysUsageEvent() argument
113 return QuerySysUsageEvent(oldEvent, table) != 0 ? in InsertSysUsageEvent()
114 InsertSysUsageTable(table, event->ToJsonString()) : in InsertSysUsageEvent()
115 UpdateSysUsageTable(table, event->ToJsonString()); in InsertSysUsageEvent()
128 HIVIEW_LOGI("failed to query pluginStats table, pluginName=%{public}s", pluginName.c_str()); in QueryPluginStatsEvent()
144 int EventDbHelper::QuerySysUsageEvent(std::shared_ptr<LoggerEvent>& event, const std::string& table) in QuerySysUsageEvent() argument
151 if (QuerySysUsageTable(eventStr, table) != 0 || eventStr.empty()) { in QuerySysUsageEvent()
152 HIVIEW_LOGD("failed to query sysUsage table=%{public}s", table.c_str()); in QuerySysUsageEvent()
172 int EventDbHelper::DeleteSysUsageEvent(const std::string& table) in DeleteSysUsageEvent() argument
181 CreateTable(const std::string& table, const std::vector<std::pair<std::string, std::string>>& fields) CreateTable() argument
192 CreatePluginStatsTable(const std::string& table) CreatePluginStatsTable() argument
207 CreateSysUsageTable(const std::string& table) CreateSysUsageTable() argument
239 InsertSysUsageTable(const std::string& table, const std::string& eventStr) InsertSysUsageTable() argument
272 UpdateSysUsageTable(const std::string& table, const std::string& eventStr) UpdateSysUsageTable() argument
291 QuerySysUsageTable(std::string& eventStr, const std::string& table) QuerySysUsageTable() argument
301 QueryDb(std::vector<std::string>& eventStrs, const std::string& table, const std::vector<std::pair<std::string, std::string>>& queryConds) QueryDb() argument
324 DeleteTableData(const std::string& table) DeleteTableData() argument
[all...]
H A Dusage_event_cacher.cpp36 std::shared_ptr<LoggerEvent> UsageEventCacher::GetSysUsageEvent(const std::string& table) const in GetSysUsageEvent()
39 if (dbHelper_->QuerySysUsageEvent(event, table) < 0) { in GetSysUsageEvent()
54 void UsageEventCacher::DeleteSysUsageEventFromDb(const std::string& table) const in DeleteSysUsageEventFromDb()
57 if (dbHelper_->QuerySysUsageEvent(event, table) >= 0) { in DeleteSysUsageEventFromDb()
58 dbHelper_->DeleteSysUsageEvent(table); in DeleteSysUsageEventFromDb()
72 void UsageEventCacher::SaveSysUsageEventToDb(const std::shared_ptr<LoggerEvent>& event, const std::string& table) const in SaveSysUsageEventToDb()
77 if (dbHelper_->InsertSysUsageEvent(event, table) < 0) { in SaveSysUsageEventToDb()
/base/security/security_guard/services/data_collect/store/src/
H A Ddatabase_helper.cpp71 SecEventTableInfo table; in QueryRecentEventByEventId() local
72 int32_t ret = GetResultSetTableInfo(resultSet, table); in QueryRecentEventByEventId()
77 resultSet->GetLong(table.eventIdIndex, event.eventId); in QueryRecentEventByEventId()
78 resultSet->GetString(table.versionIndex, event.version); in QueryRecentEventByEventId()
79 resultSet->GetString(table.dateIndex, event.date); in QueryRecentEventByEventId()
80 resultSet->GetString(table.contentIndex, event.content); in QueryRecentEventByEventId()
257 SecEventTableInfo table; in QueryEventBase() local
258 table.userIdIndex = INVALID_INDEX; in QueryEventBase()
259 table.deviceIdIndex = INVALID_INDEX; in QueryEventBase()
260 int32_t ret = GetResultSetTableInfo(resultSet, table); in QueryEventBase()
282 GetResultSetTableInfo(const std::shared_ptr<NativeRdb::ResultSet> &resultSet, SecEventTableInfo &table) GetResultSetTableInfo() argument
346 std::string table; CreateTable() local
[all...]
H A Ddatabase_manager.cpp51 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(event.eventId); in InsertEvent() local
52 SGLOGD("table=%{public}s, eventId=%{public}" PRId64, table.c_str(), config.eventId); in InsertEvent()
53 if (table == AUDIT_TABLE) { in InsertEvent()
76 int DatabaseManager::QueryAllEvent(std::string table, std::vector<SecEvent> &events) in QueryAllEvent() argument
78 if (table == RISK_TABLE) { in QueryAllEvent()
86 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(eventId); in QueryRecentEventByEventId() local
87 if (table == RISK_TABLE) { in QueryRecentEventByEventId()
93 int DatabaseManager::QueryRecentEventByEventId(std::string table, const std::vector<int64_t> &eventId, in QueryRecentEventByEventId() argument
96 if (table in QueryRecentEventByEventId()
102 QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events, std::string beginTime, std::string endTime) QueryEventByEventIdAndDate() argument
113 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(eventId); QueryEventByEventId() local
120 QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events) QueryEventByEventId() argument
129 QueryEventByEventType(std::string table, int32_t eventType, std::vector<SecEvent> &events) QueryEventByEventType() argument
137 QueryEventByLevel(std::string table, int32_t level, std::vector<SecEvent> &events) QueryEventByLevel() argument
145 QueryEventByOwner(std::string table, std::string owner, std::vector<SecEvent> &events) QueryEventByOwner() argument
153 CountAllEvent(std::string table) CountAllEvent() argument
163 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(eventId); CountEventByEventId() local
172 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(eventId); DeleteOldEventByEventId() local
181 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(eventId); DeleteAllEventByEventId() local
[all...]
H A Drisk_event_rdb_helper.cpp39 std::string table = CreateTable(); in Init() local
41 createTableVec.push_back(table); in Init()
/base/hiviewdfx/hiview/base/utility/
H A Dsql_util.cpp20 std::string GenerateCreateSql(const std::string& table, in GenerateCreateSql() argument
25 sql += table; in GenerateCreateSql()
38 std::string GenerateExistSql(const std::string& table) in GenerateExistSql() argument
40 std::string sql = "SELECT name FROM sqlite_sequence WHERE name = '" + table + "'"; in GenerateExistSql()
44 std::string GenerateDropSql(const std::string& table) in GenerateDropSql() argument
48 sql += table; in GenerateDropSql()
/base/hiviewdfx/hiview/plugins/usage_event_report/cache/include/
H A Devent_db_helper.h34 int InsertSysUsageEvent(std::shared_ptr<LoggerEvent> event, const std::string& table);
36 int QuerySysUsageEvent(std::shared_ptr<LoggerEvent>& events, const std::string& table);
38 int DeleteSysUsageEvent(const std::string& table);
42 int CreateTable(const std::string& table, const std::vector<std::pair<std::string, std::string>>& fields);
43 int CreatePluginStatsTable(const std::string& table);
44 int CreateSysUsageTable(const std::string& table);
46 int InsertSysUsageTable(const std::string& table, const std::string& eventStr);
48 int UpdateSysUsageTable(const std::string& table, const std::string& eventStr);
50 int QuerySysUsageTable(std::string& eventStr, const std::string& table);
51 int QueryDb(std::vector<std::string>& eventStrs, const std::string& table,
[all...]
H A Dusage_event_cacher.h35 std::shared_ptr<LoggerEvent> GetSysUsageEvent(const std::string& table = SysUsageDbSpace::SYS_USAGE_TABLE) const;
38 void DeleteSysUsageEventFromDb(const std::string& table = SysUsageDbSpace::SYS_USAGE_TABLE) const;
40 const std::string& table = SysUsageDbSpace::SYS_USAGE_TABLE) const;
/base/security/security_guard/test/unittest/mock/database_manager/
H A Ddatabase_manager.h34 virtual int QueryAllEvent(std::string table, std::vector<SecEvent> &events) = 0;
36 virtual int QueryRecentEventByEventId(std::string table, const std::vector<int64_t> &eventId,
38 virtual int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds,
41 virtual int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds,
43 virtual int QueryEventByEventType(std::string table, int32_t eventType, std::vector<SecEvent> &events) = 0;
44 virtual int QueryEventByLevel(std::string table, int32_t level, std::vector<SecEvent> &events) = 0;
45 virtual int QueryEventByOwner(std::string table, std::string owner, std::vector<SecEvent> &events) = 0;
46 virtual int64_t CountAllEvent(std::string table) = 0;
65 MOCK_METHOD2(QueryAllEvent, int(std::string table, std::vector<SecEvent> &events));
67 MOCK_METHOD3(QueryRecentEventByEventId, int(std::string table, cons
[all...]
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/
H A Dsql_util.cpp20 std::string CreateTable(const std::string& table, const std::vector<std::pair<std::string, std::string>>& fields) in CreateTable() argument
23 std::string sql = "CREATE TABLE IF NOT EXISTS " + table + "(" + "seq INTEGER PRIMARY KEY AUTOINCREMENT"; in CreateTable()
31 std::string DropTable(const std::string& table) in DropTable() argument
33 std::string sql = "DROP TABLE IF EXISTS " + table; in DropTable()
/base/security/security_guard/services/risk_classify/model_manager/src/
H A Dmodel_manager_impl.cpp23 std::shared_ptr<IDbOperate> ModelManagerImpl::GetDbOperate(std::string table) in GetDbOperate() argument
26 if (table == "risk_event" || table == "audit_event") { in GetDbOperate()
27 operate = std::make_shared<DbOperate>(table); in GetDbOperate()
/base/security/security_guard/services/data_collect/store/include/
H A Ddatabase_manager.h32 int QueryAllEvent(std::string table, std::vector<SecEvent> &events);
34 int QueryRecentEventByEventId(std::string table, const std::vector<int64_t> &eventId, std::vector<SecEvent> &event);
35 int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events,
38 int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events);
39 int QueryEventByEventType(std::string table, int32_t eventType, std::vector<SecEvent> &events);
40 int QueryEventByLevel(std::string table, int32_t level, std::vector<SecEvent> &events);
41 int QueryEventByOwner(std::string table, std::string owner, std::vector<SecEvent> &events);
42 int64_t CountAllEvent(std::string table);
H A Ddatabase.h34 int Insert(int64_t &outRowId, const std::string &table, const NativeRdb::ValuesBucket &initialValues);
35 int BatchInsert(int64_t &outInsertNum, const std::string &table,
/base/security/security_guard/test/unittest/data_collect/include/
H A Ddatabase_manager.h33 int QueryAllEvent(std::string table, std::vector<SecEvent> &events);
36 int QueryRecentEventByEventId(std::string table, const std::vector<int64_t> &eventId, std::vector<SecEvent> &event);
37 int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events,
40 int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events);
41 int QueryEventByEventType(std::string table, int32_t eventType, std::vector<SecEvent> &events);
42 int QueryEventByLevel(std::string table, int32_t level, std::vector<SecEvent> &events);
43 int QueryEventByOwner(std::string table, std::string owner, std::vector<SecEvent> &events);
44 int64_t CountAllEvent(std::string table);
H A Ddatabase.h34 int Insert(int64_t &outRowId, const std::string &table, const NativeRdb::ValuesBucket &initialValues);
35 int BatchInsert(int64_t &outInsertNum, const std::string &table,
/base/security/security_guard/test/unittest/data_collect/database_manager/
H A Ddatabase_manager.h33 int QueryAllEvent(std::string table, std::vector<SecEvent> &events);
35 int QueryRecentEventByEventId(std::string table, const std::vector<int64_t> &eventId, std::vector<SecEvent> &event);
36 int QueryEventByEventIdAndDate(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events,
39 int QueryEventByEventId(std::string table, std::vector<int64_t> &eventIds, std::vector<SecEvent> &events);
40 int QueryEventByEventType(std::string table, int32_t eventType, std::vector<SecEvent> &events);
41 int QueryEventByLevel(std::string table, int32_t level, std::vector<SecEvent> &events);
42 int QueryEventByOwner(std::string table, std::string owner, std::vector<SecEvent> &events);
43 int64_t CountAllEvent(std::string table);
/base/hiviewdfx/hiview/base/utility/include/
H A Dsql_util.h29 std::string GenerateCreateSql(const std::string& table,
31 std::string GenerateExistSql(const std::string& table);
32 std::string GenerateDropSql(const std::string& table);
/base/telephony/telephony_data/common/src/
H A Drdb_base_helper.cpp37 int RdbBaseHelper::Insert(int64_t &id, const NativeRdb::ValuesBucket &initialValues, const std::string &table) in Insert() argument
41 ret = store_->Insert(id, table, initialValues); in Insert()
46 int RdbBaseHelper::Update(int &changedRows, const std::string &table, const NativeRdb::ValuesBucket &values, in Update() argument
51 ret = store_->Update(changedRows, table, values, whereClause, whereArgs); in Update()
66 int RdbBaseHelper::Delete(int &changedRows, const std::string &table, const std::string &whereClause, in Delete() argument
71 ret = store_->Delete(changedRows, table, whereClause, whereArgs); in Delete()
166 int RdbBaseHelper::BatchInsert(int64_t &id, const NativeRdb::ValuesBucket &initialValues, const std::string &table) in BatchInsert() argument
/base/telephony/core_service/services/sim/include/
H A Dusim_function_handle.h23 UsimFunctionHandle(unsigned char table[], int len) in UsimFunctionHandle() argument
25 functionHandle_ = table; in UsimFunctionHandle()
/base/usb/usb_manager/services/native/src/
H A Dusb_right_db_helper.cpp255 USB_HILOGE(MODULE_USB_SERVICE, "get table info failed"); in QueryAndGetResultColumnValues()
464 const std::shared_ptr<OHOS::NativeRdb::ResultSet> &resultSet, struct UsbRightTableInfo &table) in GetResultSetTableInfo()
475 USB_HILOGE(MODULE_USB_SERVICE, "get table info failed"); in GetResultSetTableInfo()
482 table.primaryKeyIndex = i; in GetResultSetTableInfo()
485 table.uidIndex = i; in GetResultSetTableInfo()
488 table.installTimeIndex = i; in GetResultSetTableInfo()
491 table.updateTimeIndex = i; in GetResultSetTableInfo()
494 table.requestTimeIndex = i; in GetResultSetTableInfo()
497 table.validPeriodIndex = i; in GetResultSetTableInfo()
500 table in GetResultSetTableInfo()
463 GetResultSetTableInfo( const std::shared_ptr<OHOS::NativeRdb::ResultSet> &resultSet, struct UsbRightTableInfo &table) GetResultSetTableInfo() argument
519 struct UsbRightTableInfo table; GetResultRightRecordEx() local
[all...]
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/include/
H A Dsql_util.h26 std::string CreateTable(const std::string& table,
28 std::string DropTable(const std::string& table);
/base/security/security_guard/services/data_collect/sa/
H A Ddata_format.cpp66 std::string table = ConfigDataManager::GetInstance().GetTableFromEventId(*it); in ParseConditions() local
67 if (table == RISK_TABLE) { in ParseConditions()
69 } else if (table == AUDIT_TABLE) { in ParseConditions()
/base/security/security_guard/test/unittest/mock/rdb/
H A Drdb_store.h36 virtual int Insert(int64_t &outRowId, const std::string &table, const NativeRdb::ValuesBucket &initialValues) = 0;
37 virtual int BatchInsert(int64_t &outInsertNum, const std::string &table,
60 MOCK_METHOD3(Insert, int(int64_t &outRowId, const std::string &table, const ValuesBucket &initialValues));
61 MOCK_METHOD3(BatchInsert, int(int64_t &outInsertNum, const std::string &table,
/base/telephony/telephony_data/common/include/
H A Drdb_base_helper.h42 int Insert(int64_t &id, const NativeRdb::ValuesBucket &initialValues, const std::string &table);
43 int BatchInsert(int64_t &id, const NativeRdb::ValuesBucket &initialValues, const std::string &table);
44 int Update(int &changedRows, const std::string &table, const NativeRdb::ValuesBucket &values,
48 int Delete(int &changedRows, const std::string &table, const std::string &whereClause = "",

Completed in 7 milliseconds

123