Documentation ¶
Overview ¶
Package eblocks provides functions and SQL framents for working with the "eblocks" table, which stores factom.EBlock.
Index ¶
- Constants
- func Insert(conn *sqlite.Conn, eb factom.EBlock, dbKeyMR *factom.Bytes32) error
- func Select(stmt *sqlite.Stmt) (factom.EBlock, error)
- func SelectByHeight(conn *sqlite.Conn, height uint32) (factom.EBlock, error)
- func SelectBySequence(conn *sqlite.Conn, seq uint32) (factom.EBlock, error)
- func SelectDBKeyMR(conn *sqlite.Conn, seq uint32) (factom.Bytes32, error)
- func SelectKeyMR(conn *sqlite.Conn, seq uint32) (factom.Bytes32, error)
- func SelectLatest(conn *sqlite.Conn) (factom.EBlock, factom.Bytes32, error)
Constants ¶
const CreateTable = `` /* 294-byte string literal not displayed */
CreateTable is a SQL string that creates the "eblocks" table.
const SelectWhere = `SELECT "key_mr", "data", "timestamp" FROM "eblocks" WHERE `
SelectWhere is a SQL fragment for retrieving rows from the "eblocks" table with Select().
Variables ¶
This section is empty.
Functions ¶
func Select ¶
Select the next factom.EBlock from the given prepared Stmt.
The Stmt must be created with a SQL string starting with SelectWhere.
func SelectByHeight ¶
SelectByHeight returns the factom.EBlock with the given height.
func SelectBySequence ¶
SelectBySequence returns the factom.EBlock with sequence seq.
func SelectDBKeyMR ¶
SelectDBKeyMR returns the DBKeyMR for the EBlock with sequence seq.
func SelectKeyMR ¶
SelectKeyMR returns the KeyMR for the EBlock with sequence seq.
Types ¶
This section is empty.