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

Function primary_key_name

plugins/sql.c:1598–1604  ·  view source on GitHub ↗

We use created_index as INTEGER PRIMARY KEY, if it exists. * Otherwise, we make an explicit rowid (implicit rowids cannot be * used as a foreign key). */

Source from the content-addressed store, hash-verified

1596 * Otherwise, we make an explicit rowid (implicit rowids cannot be
1597 * used as a foreign key). */
1598static const char *primary_key_name(const struct table_desc *td)
1599{
1600 if (td->has_created_index)
1601 return "created_index";
1602
1603 return "rowid";
1604}
1605
1606/* Creates sql statements, initializes table */
1607static void finish_td(struct plugin *plugin, struct table_desc *td)

Callers 2

finish_tdFunction · 0.85
print_columnsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected