jdb

package
v0.0.69 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Firebird = "firebird"
View Source
const Mysql = "mysql"
View Source
const Postgres = "postgres"
View Source
const Sqlserver = "sqlserver"

Variables

This section is empty.

Functions

func Close

func Close() error

func CloseListen added in v0.0.34

func CloseListen(host, channel string)

func Connected

func Connected(driver, host string, port int, dbname, user, password string) (int, error)

func DBClose

func DBClose(idx int) error

func DBQDDL

func DBQDDL(db int, sql string, args ...any) (e.Items, error)

* * DBQDDL *

func DBQuery

func DBQuery(db int, sql string, args ...any) (e.Items, error)

func DBQueryAtrib

func DBQueryAtrib(db int, sql, atrib string, args ...any) (e.Items, error)

func DBQueryAtribOne

func DBQueryAtribOne(db int, sql, atrib string, args ...any) (e.Item, error)

func DBQueryCount

func DBQueryCount(db int, sql string, args ...any) int

func DBQueryData

func DBQueryData(db int, sql string, args ...any) (e.Items, error)

func DBQueryDataOne

func DBQueryDataOne(db int, sql string, args ...any) (e.Item, error)

func DBQueryOne

func DBQueryOne(db int, sql string, args ...any) (e.Item, error)

func HttpQuery added in v0.0.34

func HttpQuery(sql string, args []any) (e.Items, error)

* * *

func IsCloseListen added in v0.0.34

func IsCloseListen(host, channel string) bool

func Listen

func Listen(nodo, url, channel string, listen func(res e.Json))

func ListenClose

func ListenClose(listen *pq.Listener) error

func ListenEvent

func ListenEvent(nodo, url, channel string, listener *pq.Listener, listen func(res e.Json))

func QDDL

func QDDL(sql string, args ...any) (e.Items, error)

* * Query *

func Query

func Query(sql string, args ...any) (e.Items, error)

func QueryAtrib

func QueryAtrib(sql, atrib string, args ...any) (e.Items, error)

func QueryAtribOne

func QueryAtribOne(sql, atrib string, args ...any) (e.Item, error)

func QueryCount

func QueryCount(sql string, args ...any) int

func QueryData

func QueryData(sql string, args ...any) (e.Items, error)

func QueryDataOne

func QueryDataOne(sql string, args ...any) (e.Item, error)

func QueryOne

func QueryOne(sql string, args ...any) (e.Item, error)

func SQLDDL

func SQLDDL(sql string, args ...any) string

func SQLParse

func SQLParse(sql string, args ...any) string

func SQLQuote

func SQLQuote(sql string) string

* * Data Definition Language *

Types

type Conn

type Conn struct {
	Db []*Db
}

func Load

func Load() (*Conn, error)

type Db

type Db struct {
	Index       int
	Description string
	Driver      string
	Host        string
	Port        int
	Dbname      string
	User        string
	URL         string
	Db          *sql.DB
}

func DB

func DB(idx int) *Db

func (*Db) Close

func (c *Db) Close() error

func (*Db) Describe

func (c *Db) Describe() e.Json

Jump to

Keyboard shortcuts

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