Documentation
¶
Overview ¶
Package metadata provides functions and SQL framents for working with the "metadata" table, which stores the sync height, sync DBKeyMR, factom.NetworkID, and factom.Identity.
Index ¶
- Constants
- func AddNumIssued(conn *sqlite.Conn, add uint64) error
- func Insert(conn *sqlite.Conn, syncHeight uint32, syncDBKeyMR *factom.Bytes32, ...) error
- func Select(conn *sqlite.Conn) (syncHeight uint32, numIssued uint64, syncDBKeyMR *factom.Bytes32, ...)
- func SetInitEntryID(conn *sqlite.Conn, id int64) error
- func SetSync(conn *sqlite.Conn, height uint32, dbKeyMR *factom.Bytes32) error
Constants ¶
const CreateTable = `` /* 447-byte string literal not displayed */
CreateTable is a SQL string that creates the "metadata" table.
The "metadata" table has a foreign key reference to the "entries" table, which must exist first.
Variables ¶
This section is empty.
Functions ¶
func Insert ¶
func Insert(conn *sqlite.Conn, syncHeight uint32, syncDBKeyMR *factom.Bytes32, networkID factom.NetworkID, identity factom.Identity) error
Insert the syncHeight, syncDBKeyMR, networkID, and if populated, the identity into the first row of the "metadata" table. This may only ever be called once for a given database.
func SetInitEntryID ¶
SetInitEntryID updates the "init_entry_id"
Types ¶
This section is empty.