Home
last modified time | relevance | path

Searched refs:sql (Results 1 – 25 of 27) sorted by relevance

12

/base/hiviewdfx/hiview/base/utility/
Dsql_util.cpp23 std::string sql; in GenerateCreateSql() local
24 sql += "CREATE TABLE IF NOT EXISTS "; in GenerateCreateSql()
25 sql += table; in GenerateCreateSql()
26 sql += "("; in GenerateCreateSql()
27 sql += "id INTEGER PRIMARY KEY AUTOINCREMENT"; // default field: id in GenerateCreateSql()
29 sql += ", "; in GenerateCreateSql()
30 sql += field.first; in GenerateCreateSql()
31 sql += " "; in GenerateCreateSql()
32 sql += field.second; in GenerateCreateSql()
34 sql += ")"; in GenerateCreateSql()
[all …]
/base/security/access_token/services/privacymanager/src/database/
Dpermission_used_record_db.cpp213 std::string sql = "insert into " + it->second.tableName_ + " values("; in CreateInsertPrepareSqlCmd() local
216 sql.append(":" + columnName); in CreateInsertPrepareSqlCmd()
218 sql.append(","); in CreateInsertPrepareSqlCmd()
222 sql.append(")"); in CreateInsertPrepareSqlCmd()
223 return sql; in CreateInsertPrepareSqlCmd()
233 std::string sql = "delete from " + it->second.tableName_ + " where 1 = 1"; in CreateDeletePrepareSqlCmd() local
235 sql.append(" and "); in CreateDeletePrepareSqlCmd()
236 sql.append(columnName + "=:" + columnName); in CreateDeletePrepareSqlCmd()
238 return sql; in CreateDeletePrepareSqlCmd()
253 std::string sql = "update " + it->second.tableName_ + " set "; in CreateUpdatePrepareSqlCmd() local
[all …]
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/cache/
Dapp_event_store.cpp40 std::string sql; in GenerateCreateSql() local
41 sql += "CREATE TABLE IF NOT EXISTS "; in GenerateCreateSql()
42 sql += table; in GenerateCreateSql()
43 sql += "("; in GenerateCreateSql()
44 sql += "seq INTEGER PRIMARY KEY AUTOINCREMENT"; // default field: seq in GenerateCreateSql()
46 sql += ", "; in GenerateCreateSql()
47 sql += field.first; in GenerateCreateSql()
48 sql += " "; in GenerateCreateSql()
49 sql += field.second; in GenerateCreateSql()
51 sql += ")"; in GenerateCreateSql()
[all …]
Dapp_event_block_dao.cpp89 std::string sql; in DeletePackageByNum() local
90 sql.append("DELETE FROM ").append(table_) in DeletePackageByNum()
94 if (int ret = dbStore->ExecuteSql(sql, objects); ret != NativeRdb::E_OK) { in DeletePackageByNum()
110 std::string sql; in GetPackagesBySize() local
111 sql.append("SELECT ") in GetPackagesBySize()
117 auto resultSet = dbStore->QuerySql(sql, std::vector<std::string> {}); in GetPackagesBySize()
147 std::string sql; in CountPackages() local
148 sql.append("SELECT count(*), sum(").append(Block::FIELD_SIZE).append(") FROM ").append(table_); in CountPackages()
149 auto resultSet = dbStore->QuerySql(sql, std::vector<std::string> {}); in CountPackages()
Dapp_event_blocks_dao.cpp43 std::string sql; in IsBlockExists() local
44 sql.append("SELECT COUNT(*) FROM ").append(table_) in IsBlockExists()
48 if (int ret = dbStore->ExecuteAndGetLong(count, sql, objects); ret != NativeRdb::E_OK) { in IsBlockExists()
100 std::string sql; in GetBlocks() local
101 sql.append("SELECT ").append(Blocks::FIELD_NAME).append(" FROM ").append(table_); in GetBlocks()
102 auto resultSet = dbStore->QuerySql(sql, std::vector<std::string> {}); in GetBlocks()
/base/security/access_token/services/accesstokenmanager/main/cpp/src/database/
Dsqlite_storage.cpp216 std::string sql = "insert into " + it->second.tableName_ + " values("; in CreateInsertPrepareSqlCmd() local
219 sql.append(":" + columnName); in CreateInsertPrepareSqlCmd()
221 sql.append(","); in CreateInsertPrepareSqlCmd()
225 sql.append(")"); in CreateInsertPrepareSqlCmd()
226 return sql; in CreateInsertPrepareSqlCmd()
236 std::string sql = "delete from " + it->second.tableName_ + " where 1 = 1"; in CreateDeletePrepareSqlCmd() local
238 sql.append(" and "); in CreateDeletePrepareSqlCmd()
239 sql.append(columnName + "=:" + columnName); in CreateDeletePrepareSqlCmd()
241 return sql; in CreateDeletePrepareSqlCmd()
256 std::string sql = "update " + it->second.tableName_ + " set "; in CreateUpdatePrepareSqlCmd() local
[all …]
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/src/
Ddata_share_dao.cpp54 std::string sql; in IsUidExists() local
55 sql.append("SELECT COUNT(*) FROM ").append(eventTable_) in IsUidExists()
59 if (int ret = dbStore->ExecuteAndGetLong(count, sql, objects); ret != NativeRdb::E_OK) { in IsUidExists()
128 std::string sql; in GetEventListByUid() local
129 sql.append("SELECT ") in GetEventListByUid()
134 auto resultSet = dbStore->QuerySql(sql, std::vector<std::string> {std::to_string(uid)}); in GetEventListByUid()
153 std::string sql; in GetUidByBundleName() local
154 sql.append("SELECT ") in GetUidByBundleName()
159 auto resultSet = dbStore->QuerySql(sql, std::vector<std::string> {bundleName}); in GetUidByBundleName()
178 std::string sql; in GetTotalSubscriberInfo() local
[all …]
Ddata_share_store.cpp45 std::string sql = SqlUtil::GenerateCreateSql(EventTable::TABLE, fields); in OnCreate() local
46 if (int ret = rdbStore.ExecuteSql(sql); ret != NativeRdb::E_OK) { in OnCreate()
77 std::string sql = SqlUtil::GenerateDropSql(tableName); in DropTable() local
78 if (int ret = dbStore->ExecuteSql(sql); ret != NativeRdb::E_OK) { in DropTable()
/base/update/updateservice/services/firmware/data/db/src/
Dfirmware_database_callback.cpp31 for (auto &sql : dbCreateSqlVector) { in OnCreate() local
32 int ret = rdbStore.ExecuteSql(sql); in OnCreate()
34 …OGE("FirmwareDatabaseCallback OnCreate create table %{public}s, ret=%{public}d", sql.c_str(), ret); in OnCreate()
/base/hiviewdfx/hiview/base/event_store/include/
Dsys_event_query_wrapper.h36 static void LogTooManyQueryRules(const std::string sql);
38 static void LogQueryOverTime(time_t costTime, const std::string sql, bool innerQuery = true);
39 static void LogQueryCountOverLimit(const int32_t queryCount, const std::string& sql,
41 …static void LogQueryTooFrequently(const std::string& sql, const std::string& processName = std::st…
/base/telephony/telephony_data/common/src/
Drdb_base_helper.cpp86 int RdbBaseHelper::ExecuteSql(const std::string &sql) in ExecuteSql() argument
90 ret = store_->ExecuteSql(sql); in ExecuteSql()
95 int RdbBaseHelper::ExecuteSql(const std::string &sql, const std::vector<NativeRdb::ValueObject> &bi… in ExecuteSql() argument
99 ret = store_->ExecuteSql(sql, bindArgs); in ExecuteSql()
105 const std::string &sql, const std::vector<std::string> &selectionArgs) in QuerySql() argument
109 return store_->QuerySql(sql); in QuerySql()
/base/telephony/telephony_data/opkey/src/
Drdb_opkey_callback.cpp79 std::string sql; in ClearData() local
80 sql.append("delete from ").append(TABLE_OPKEY_INFO); in ClearData()
81 return rdbStore.ExecuteSql(sql); in ClearData()
/base/hiviewdfx/hiview/base/event_store/dao/
Dsys_event_query_wrapper.cpp49 void QueryStatusLogUtil::LogTooManyQueryRules(const std::string sql) in LogTooManyQueryRules() argument
52 info.append(sql); in LogTooManyQueryRules()
64 void QueryStatusLogUtil::LogQueryOverTime(time_t costTime, const std::string sql, bool innerQuery) in LogQueryOverTime() argument
67 info.append(std::to_string(costTime)).append(SPACE_CONCAT).append("SQL=").append(sql); in LogQueryOverTime()
71 void QueryStatusLogUtil::LogQueryCountOverLimit(const int32_t queryCount, const std::string& sql, in LogQueryCountOverLimit() argument
75 info.append(std::to_string(queryCount)).append(SPACE_CONCAT).append("SQL=").append(sql); in LogQueryCountOverLimit()
79 void QueryStatusLogUtil::LogQueryTooFrequently(const std::string& sql, const std::string& processNa… in LogQueryTooFrequently() argument
86 info.append("SQL=").append(sql); in LogQueryTooFrequently()
/base/security/access_token/services/common/database/include/
Dsqlite_helper.h40 Statement Prepare(const std::string& sql) const;
41 int32_t ExecuteSql(const std::string& sql) const;
Dstatement.h32 Statement(sqlite3* db, const std::string& sql);
/base/security/access_token/services/common/database/src/
Dstatement.cpp27 Statement::Statement(sqlite3* db, const std::string& sql) : db_(db), sql_(sql) in Statement() argument
29 if (sqlite3_prepare_v2(db, sql.c_str(), sql.size(), &statement_, nullptr) != SQLITE_OK) { in Statement()
Dsqlite_helper.cpp131 Statement SqliteHelper::Prepare(const std::string& sql) const in Prepare()
133 return Statement(db_, sql); in Prepare()
136 int32_t SqliteHelper::ExecuteSql(const std::string& sql) const in ExecuteSql()
144 int32_t res = sqlite3_exec(db_, sql.c_str(), nullptr, nullptr, &errorMessage); in ExecuteSql()
/base/telephony/telephony_data/sms_mms/src/
Drdb_sms_mms_helper.cpp237 std::string sql; in QueryMaxGroupId() local
239 sql.append("select MAX(").append(SmsMmsInfo::GROUP_ID).append(") as "); in QueryMaxGroupId()
240 sql.append(maxGroupId).append(" from ") .append(TABLE_SMS_MMS_INFO); in QueryMaxGroupId()
241 return QuerySql(sql); in QueryMaxGroupId()
246 std::string sql; in StatisticsUnRead() local
247 sql.append("select count(*) as totalListCount, "); in StatisticsUnRead()
248sql.append("count(CASE WHEN ").append(SmsMmsInfo::MSG_TYPE).append("=0 THEN 1 ELSE null END) as un… in StatisticsUnRead()
249sql.append("count(CASE WHEN ").append(SmsMmsInfo::MSG_TYPE).append("=1 THEN 1 ELSE null END) as un… in StatisticsUnRead()
250sql.append(" from ").append(TABLE_SMS_MMS_INFO).append(" WHERE ").append(SmsMmsInfo::IS_READ).appe… in StatisticsUnRead()
251 return QuerySql(sql); in StatisticsUnRead()
/base/telephony/telephony_data/common/include/
Drdb_base_helper.h52 …const std::string &sql, const std::vector<std::string> &selectionArgs = std::vector<std::string>()…
55 int ExecuteSql(const std::string &sql);
56 int ExecuteSql(const std::string &sql, const std::vector<NativeRdb::ValueObject> &bindArgs);
/base/usb/usb_manager/services/native/src/
Dusb_right_database.cpp169 int32_t UsbRightDataBase::ExecuteSql(const std::string &sql, const std::vector<OHOS::NativeRdb::Val… in ExecuteSql() argument
175 int32_t ret = store_->ExecuteSql(sql, bindArgs); in ExecuteSql()
184 const std::string &sql, const std::vector<std::string> &selectionArgs) in QuerySql() argument
190 return store_->QuerySql(sql); in QuerySql()
205 std::string sql = CREATE_USB_RIGHT_TABLE; in OnCreate() local
206 int32_t ret = store.ExecuteSql(sql); in OnCreate()
/base/telephony/telephony_data/pdp_profile/src/
Drdb_pdp_profile_helper.cpp118 std::string sql; in ResetApn() local
119sql.append("alter table ").append(TEMP_TABLE_PDP_PROFILE).append(" rename to ").append(TABLE_PDP_P… in ResetApn()
120 ret = ExecuteSql(sql); in ResetApn()
/base/usb/usb_manager/services/native/include/
Dusb_right_database.h60 int32_t ExecuteSql(const std::string &sql,
63 const std::string &sql, const std::vector<std::string> &selectionArgs);
/base/telephony/telephony_data/sim/src/
Drdb_sim_helper.cpp173 std::string sql; in ClearData() local
174 sql.append("delete from ").append(TABLE_SIM_INFO); in ClearData()
175 return ExecuteSql(sql); in ClearData()
/base/notification/distributed_notification_service/services/ans/test/unittest/notification_rdb_data_mgr_test/
Dnotification_rdb_data_mgr_test.cpp112 const std::string &sql, const std::vector<std::string> &selectionArgs) in QuerySql() argument
117 const std::string &sql, const std::vector<ValueObject> &selectionArgs = {}) in QuerySql() argument
122 const std::string &sql, const std::vector<std::string> &selectionArgs) in QueryByStep() argument
127 const std::string &sql, const std::vector<ValueObject> &bindArgs = {}) in QueryByStep() argument
132 … const std::string &sql, const std::vector<ValueObject> &bindArgs = std::vector<ValueObject>()) in ExecuteSql() argument
136 virtual int ExecuteAndGetLong(int64_t &outValue, const std::string &sql, in ExecuteAndGetLong() argument
141 virtual int ExecuteAndGetString(std::string &outValue, const std::string &sql, in ExecuteAndGetString() argument
146 virtual int ExecuteForLastInsertedRowId(int64_t &outValue, const std::string &sql, in ExecuteForLastInsertedRowId() argument
151 virtual int ExecuteForChangedRowCount(int64_t &outValue, const std::string &sql, in ExecuteForChangedRowCount() argument
/base/security/access_token/interfaces/innerkits/analysis_model/include/
Dcode_signature_analysis_kit.h33 int32_t (*execSql)(const char *sql, uint8_t *result, uint32_t resultLen);

12