metadata

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: MIT Imports: 5 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 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

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

func AddNumIssued(conn *sqlite.Conn, add uint64) error

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 Select

func Select(conn *sqlite.Conn) (syncHeight uint32, numIssued uint64,
	syncDBKeyMR *factom.Bytes32,
	networkID factom.NetworkID,
	identity factom.Identity,
	issuance fat.Issuance,
	err error)

func SetInitEntryID

func SetInitEntryID(conn *sqlite.Conn, id int64) error

SetInitEntryID updates the "init_entry_id"

func SetSync

func SetSync(conn *sqlite.Conn, height uint32, dbKeyMR *factom.Bytes32) error

SetSync updates the "sync_height" and "sync_db_key_mr".

Types

This section is empty.

Jump to

Keyboard shortcuts

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