model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package model contains the types for schema 'public'.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxTransfer

type TxTransfer struct {
	ID      int64          `json:"id"`       // id
	ChainID sql.NullString `json:"chain_id"` // chain_id
	Height  sql.NullInt64  `json:"height"`   // height
	Hash    sql.NullString `json:"hash"`     // hash
	Address sql.NullString `json:"address"`  // address
	Coin    sql.NullString `json:"coin"`     // coin
	Amount  sql.NullString `json:"amount"`   // amount
	Type    sql.NullInt64  `json:"type"`     // type
	Time    pq.NullTime    `json:"time"`     // time
	// contains filtered or unexported fields
}

TxTransfer represents a row from 'public.tx_transfer'.

func TxTransferByID

func TxTransferByID(db model.XODB, id int64) (*TxTransfer, error)

TxTransferByID retrieves a row from 'public.tx_transfer' as a TxTransfer.

Generated from index 'tx_transfer_pkey'.

func TxTransferFilter

func TxTransferFilter(db model.XODB, filter, sort string, offset, limit int64) ([]*TxTransfer, error)

TxTransfersQuery returns offset-limit rows from 'public.tx_transfer' filte by filter, ordered by "id" in descending order.

func TxTransfersByAddress

func TxTransfersByAddress(db model.XODB, address sql.NullString) ([]*TxTransfer, error)

TxTransfersByAddress retrieves a row from 'public.tx_transfer' as a TxTransfer.

Generated from index 'tx_transfer_address_idx'.

func (*TxTransfer) Delete

func (tt *TxTransfer) Delete(db model.XODB) error

Delete deletes the TxTransfer from the database.

func (*TxTransfer) Deleted

func (tt *TxTransfer) Deleted() bool

Deleted provides information if the TxTransfer has been deleted from the database.

func (*TxTransfer) Exists

func (tt *TxTransfer) Exists() bool

Exists determines if the TxTransfer exists in the database.

func (*TxTransfer) Insert

func (tt *TxTransfer) Insert(db model.XODB) error

Insert inserts the TxTransfer to the database.

func (*TxTransfer) Save

func (tt *TxTransfer) Save(db model.XODB) error

Save saves the TxTransfer to the database.

func (*TxTransfer) Update

func (tt *TxTransfer) Update(db model.XODB) error

Update updates the TxTransfer in the database.

func (*TxTransfer) Upsert

func (tt *TxTransfer) Upsert(db model.XODB) error

Upsert performs an upsert for TxTransfer.

NOTE: PostgreSQL 9.5+ only

Jump to

Keyboard shortcuts

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