eblock

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

Index

Constants

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

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

View Source
const SelectWhere = `SELECT "key_mr", "data", "timestamp" FROM "eblock" WHERE `

SelectWhere is a SQL fragment for retrieving rows from the "eblock" 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 "eblock" 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