database

package
v0.0.0-...-79e0140 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 6 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder(ctx *database.Context) (database.Database, error)

Builder allows to create a new Db instance implementing the database.Builder type

Types

type Db

type Db struct {
	*postgresql.Database
	Sqlx *sqlx.DB
}

Db represents a PostgreSQL database with expanded features. so that it can properly store posts and other Wasm-related data.

func Cast

func Cast(database database.Database) *Db

Cast casts the given database to be a *Db

func (*Db) HasValidator

func (db *Db) HasValidator(_ string) (bool, error)

HasValidator overrides postgresql.Database to perform a no-op

func (Db) SaveCode

func (db Db) SaveCode(code types.Code) error

SaveCode allows to save the given code into the database.

func (*Db) SaveCommitSignatures

func (db *Db) SaveCommitSignatures(_ []*juno.CommitSig) error

SaveCommitSignatures overrides postgresql.Database to perform a no-op

func (Db) SaveContract

func (db Db) SaveContract(contract types.Contract) error

SaveContract allows to save the given contract into the database.

func (Db) SaveContractCodeID

func (db Db) SaveContractCodeID(contract string, codeID uint64) error

SaveContractCodeID save new contract CodeID.

func (*Db) SaveMessage

func (db *Db) SaveMessage(_ *juno.Message) error

SaveMessage overrides postgresql.Database to perform a no-op

func (*Db) SaveTx

func (db *Db) SaveTx(_ *juno.Tx) error

SaveTx overrides postgresql.Database to perform a no-op

func (*Db) SaveValidators

func (db *Db) SaveValidators(_ []*juno.Validator) error

SaveValidators overrides postgresql.Database to perform a no-op

func (Db) UpdateContractAdmin

func (db Db) UpdateContractAdmin(contract string, admin string) error

UpdateContractAdmin update contract admin.

Jump to

Keyboard shortcuts

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