Documentation
¶
Overview ¶
Package metadata provides functions and SQL fragments for working with the "factom_chain" and "fat_chain" metadata tables, which store the sync height, sync DBKeyMR, factom.NetworkID, and factom.Identity.
Index ¶
- Constants
- func AddNumIssued(conn *sqlite.Conn, add uint64) error
- func InsertFATChain(conn *sqlite.Conn, tokenID string, issuer *factom.Bytes32) error
- func InsertFactomChain(conn *sqlite.Conn, networkID factom.NetworkID, chainID *factom.Bytes32) error
- func SelectFATChain(conn *sqlite.Conn) (numIssued uint64, tokenID string, identity factom.Identity, ...)
- func SelectFactomChain(conn *sqlite.Conn) (syncHeight uint32, syncDBKeyMR factom.Bytes32, networkID factom.NetworkID, ...)
- func SetInitEntryID(conn *sqlite.Conn, id int64) error
- func SetSync(conn *sqlite.Conn, height uint32, dbKeyMR *factom.Bytes32) error
- func UpdateIdentity(conn *sqlite.Conn, identity factom.Identity) error
Constants ¶
const CreateTableFATChain = `` /* 398-byte string literal not displayed */
CreateTableFATChain is a SQL string that creates the "fat_chain" metadata table.
The "fat_chain" table has a foreign key reference to the "entry" table, which must exist first.
const CreateTableFactomChain = `` /* 269-byte string literal not displayed */
CreateTableFactomChain is a SQL string that creates the "factom_chain" metadata table.
Variables ¶
This section is empty.
Functions ¶
func InsertFATChain ¶ added in v1.1.0
Insert the TokenID and issuer Chain ID into the first row of the "fat_chain" table. This may only ever be called once for a given database.
func InsertFactomChain ¶ added in v1.1.0
func InsertFactomChain(conn *sqlite.Conn, networkID factom.NetworkID, chainID *factom.Bytes32) error
Insert the syncHeight, syncDBKeyMR, and networkID into the first row of the "factom_chain" table. This may only ever be called once for a given database.
func SelectFATChain ¶ added in v1.1.0
func SelectFactomChain ¶ added in v1.1.0
func SetInitEntryID ¶
SetInitEntryID updates the "init_entry_id"
Types ¶
This section is empty.