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

Method Escape

lib/db_ido_pgsql/idopgsqlconnection.cpp:555–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555String IdoPgsqlConnection::Escape(const String& s)
556{
557 AssertOnWorkQueue();
558
559 String utf8s = Utility::ValidateUTF8(s);
560
561 size_t length = utf8s.GetLength();
562 auto *to = new char[utf8s.GetLength() * 2 + 1];
563
564 m_Pgsql->escapeStringConn(m_Connection, to, utf8s.CStr(), length, nullptr);
565
566 String result = String(to);
567
568 delete [] to;
569
570 return result;
571}
572
573Dictionary::Ptr IdoPgsqlConnection::FetchRow(const IdoPgsqlResult& result, int row)
574{

Callers

nothing calls this directly

Calls 4

escapeStringConnMethod · 0.80
CStrMethod · 0.80
StringClass · 0.50
GetLengthMethod · 0.45

Tested by

no test coverage detected