MCPcopy Create free account
hub / github.com/ElementsProject/lightning / db_postgres_last_insert_id

Function db_postgres_last_insert_id

db/db_postgres.c:235–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235static u64 db_postgres_last_insert_id(struct db_stmt *stmt)
236{
237 PGresult *res = PQexec(stmt->db->conn, "SELECT lastval()");
238 int id = atoi(PQgetvalue(res, 0, 0));
239 PQclear(res);
240 return id;
241}
242
243static size_t db_postgres_count_changes(struct db_stmt *stmt)
244{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected