MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CanExecuteQuery

Method CanExecuteQuery

lib/db_ido_pgsql/idopgsqlconnection.cpp:802–829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802bool IdoPgsqlConnection::CanExecuteQuery(const DbQuery& query)
803{
804 if (query.Object && !IsIDCacheValid())
805 return false;
806
807 if (query.WhereCriteria) {
808 ObjectLock olock(query.WhereCriteria);
809 Value value;
810
811 for (const Dictionary::Pair& kv : query.WhereCriteria) {
812 if (!FieldToEscapedString(kv.first, kv.second, &value))
813 return false;
814 }
815 }
816
817 if (query.Fields) {
818 ObjectLock olock(query.Fields);
819
820 for (const Dictionary::Pair& kv : query.Fields) {
821 Value value;
822
823 if (!FieldToEscapedString(kv.first, kv.second, &value))
824 return false;
825 }
826 }
827
828 return true;
829}
830
831void IdoPgsqlConnection::InternalExecuteMultipleQueries(const std::vector<DbQuery>& queries)
832{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected