database

package
v0.0.0-...-5988b85 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// InsertBondsTable query to insert a new bond into the table
	InsertBondsTable = `` /* 873-byte string literal not displayed */

	// CheckBondExist query to check if a bond exists on a specific datetime
	CheckBondExist = `SELECT COUNT(*) FROM bonds WHERE bond_last_update = $1 AND bond_name = $2 AND bond_buy_sell = $3`

	// ListDistinctBonds query list all bonds names from a specific type
	ListDistinctBonds = `SELECT DISTINCT bond_name, bond_index, bond_due_date FROM bonds WHERE bond_buy_sell = $1 ORDER BY bond_name, bond_due_date;`

	// GetBondsByNameType query list all bonds of a specific name and type
	GetBondsByNameType = `SELECT * FROM bonds WHERE bond_name = $1 AND bond_buy_sell = $2 ORDER BY bond_fetch_datetime DESC, bond_due_date;`
)

Variables

This section is empty.

Functions

func Close

func Close(dbCon *sql.DB)

Close finish connection to database server

func Open

func Open(dbConn string) (*sql.DB, error)

Open connects to database server

Types

This section is empty.

Jump to

Keyboard shortcuts

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