/base/hiviewdfx/hiview/base/utility/ |
D | sql_util.cpp | 23 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/ |
D | permission_used_record_db.cpp | 213 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/ |
D | app_event_store.cpp | 40 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 …]
|
D | app_event_block_dao.cpp | 89 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()
|
D | app_event_blocks_dao.cpp | 43 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/ |
D | sqlite_storage.cpp | 216 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/ |
D | data_share_dao.cpp | 54 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 …]
|
D | data_share_store.cpp | 45 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/ |
D | firmware_database_callback.cpp | 31 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/ |
D | sys_event_query_wrapper.h | 36 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/ |
D | rdb_base_helper.cpp | 86 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/ |
D | rdb_opkey_callback.cpp | 79 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/ |
D | sys_event_query_wrapper.cpp | 49 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/ |
D | sqlite_helper.h | 40 Statement Prepare(const std::string& sql) const; 41 int32_t ExecuteSql(const std::string& sql) const;
|
D | statement.h | 32 Statement(sqlite3* db, const std::string& sql);
|
/base/security/access_token/services/common/database/src/ |
D | statement.cpp | 27 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()
|
D | sqlite_helper.cpp | 131 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/ |
D | rdb_sms_mms_helper.cpp | 237 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() 248 …sql.append("count(CASE WHEN ").append(SmsMmsInfo::MSG_TYPE).append("=0 THEN 1 ELSE null END) as un… in StatisticsUnRead() 249 …sql.append("count(CASE WHEN ").append(SmsMmsInfo::MSG_TYPE).append("=1 THEN 1 ELSE null END) as un… in StatisticsUnRead() 250 …sql.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/ |
D | rdb_base_helper.h | 52 …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/ |
D | usb_right_database.cpp | 169 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/ |
D | rdb_pdp_profile_helper.cpp | 118 std::string sql; in ResetApn() local 119 …sql.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/ |
D | usb_right_database.h | 60 int32_t ExecuteSql(const std::string &sql, 63 const std::string &sql, const std::vector<std::string> &selectionArgs);
|
/base/telephony/telephony_data/sim/src/ |
D | rdb_sim_helper.cpp | 173 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/ |
D | notification_rdb_data_mgr_test.cpp | 112 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/ |
D | code_signature_analysis_kit.h | 33 int32_t (*execSql)(const char *sql, uint8_t *result, uint32_t resultLen);
|