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

Method add

lib_fiber/samples-c++/pgsql/main.cpp:55–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 unsigned long id_;
54
55 bool add(acl::db_handle& db, int n)
56 {
57 acl::query query;
58 query.create_sql("insert into group_tbl(group_name, uvip_tbl,"
59 " update_date) values(:group, :test, :date)")
60 .set_format("group", "group:%lu:%d", id_, n)
61 .set_parameter("test", "test")
62 .set_date("date", time(NULL), "%Y-%m-%d");
63 if (db.exec_update(query) == false)
64 {
65 printf("exec_update error: %s\r\n", db.get_error());
66 return false;
67 }
68
69 return true;
70 }
71
72 bool get(acl::db_handle& db, int n)
73 {

Callers

nothing calls this directly

Calls 3

set_parameterMethod · 0.80
exec_updateMethod · 0.80
get_errorMethod · 0.45

Tested by

no test coverage detected