MCPcopy Create free account
hub / github.com/acl-dev/acl / sql_update

Method sql_update

lib_acl_cpp/src/db/db_pgsql.cpp:630–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630bool db_pgsql::sql_update(const char* sql)
631{
632 free_result();
633
634 PGresult* res = (PGresult *) sane_pgsql_query(sql);
635 if (res == NULL) {
636 return false;
637 }
638
639 if (__dbresult_status(res) != PGRES_COMMAND_OK) {
640 logger_error("db(%s), sql(%s) error(%s)",
641 dbname_, sql, __dberror_message(conn_));
642 __dbclear(res);
643 return false;
644 }
645
646 const char* ptr = __dbcmd_tuples(res);
647 if (ptr == NULL || *ptr == 0) {
648 __dbclear(res);
649 return true;
650 }
651
652 affect_count_ = atoi(ptr);
653 __dbclear(res);
654 return true;
655}
656
657int db_pgsql::affect_count(void) const
658{

Callers 15

acl_dbsql_updateFunction · 0.45
dbaddMethod · 0.45
dbupdateMethod · 0.45
dbdelMethod · 0.45
tbl_createMethod · 0.45
tbl_createFunction · 0.45
tbl_insertFunction · 0.45
tbl_deleteFunction · 0.45
tbl_createFunction · 0.45
OnBnClickedAddDataMethod · 0.45
OnBnClickedDeleteDataMethod · 0.45
tbl_createFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected