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

Function tbl_delete

lib_acl_cpp/samples/db/pgsql_pool/main.cpp:158–183  ·  view source on GitHub ↗

ɾ��������

Source from the content-addressed store, hash-verified

156
157// ɾ��������
158static bool tbl_delete(acl::db_handle& db, int n)
159{
160 acl::query query;
161 query.create_sql("delete from group_tbl where group_name=:group")
162 .set_format("group", "group:%d", n);
163
164 if (db.exec_update(query) == false)
165 {
166 printf("delete sql error\r\n");
167 return (false);
168 }
169
170 printf(">>%s<<\r\n", query.to_string().c_str());
171
172 for (size_t i = 0; i < db.length(); i++)
173 {
174 const acl::db_row* row = db[i];
175 for (size_t j = 0; j < row->length(); j++)
176 printf("%s, ", (*row)[j]);
177 printf("\r\n");
178 }
179 // �ͷŲ�ѯ���
180 db.free_result();
181
182 return (true);
183}
184
185//////////////////////////////////////////////////////////////////////////////
186

Callers 1

runMethod · 0.70

Calls 5

exec_updateMethod · 0.80
free_resultMethod · 0.80
c_strMethod · 0.45
to_stringMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…