eblocks

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package eblocks provides functions and SQL framents for working with the "eblocks" table, which stores factom.EBlock.

Index

Constants

View Source
const CreateTable = `` /* 294-byte string literal not displayed */

CreateTable is a SQL string that creates the "eblocks" table.

View Source
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 Insert

func Insert(conn *sqlite.Conn, eb factom.EBlock, dbKeyMR *factom.Bytes32) error

Insert eb into the "eblocks" table with dbKeyMR.

func Select

func Select(stmt *sqlite.Stmt) (factom.EBlock, error)

Select the next factom.EBlock from the given prepared Stmt.

The Stmt must be created with a SQL string starting with SelectWhere.

func SelectByHeight

func SelectByHeight(conn *sqlite.Conn, height uint32) (factom.EBlock, error)

SelectByHeight returns the factom.EBlock with the given height.

func SelectBySequence

func SelectBySequence(conn *sqlite.Conn, seq uint32) (factom.EBlock, error)

SelectBySequence returns the factom.EBlock with sequence seq.

func SelectDBKeyMR

func SelectDBKeyMR(conn *sqlite.Conn, seq uint32) (factom.Bytes32, error)

SelectDBKeyMR returns the DBKeyMR for the EBlock with sequence seq.

func SelectKeyMR

func SelectKeyMR(conn *sqlite.Conn, seq uint32) (factom.Bytes32, error)

SelectKeyMR returns the KeyMR for the EBlock with sequence seq.

func SelectLatest

func SelectLatest(conn *sqlite.Conn) (factom.EBlock, factom.Bytes32, error)

SelectLatest returns the most recent factom.EBlock.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL