jdb

package
v0.0.162 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 15 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 ChangePassword added in v0.0.85

func ChangePassword(db *sql.DB, name, password string) error

Changue password

func Close

func Close() error

func Connected

func Connected(driver, host string, port int, dbname, user, password, application_name string) (*sql.DB, string, error)

func CreateColumn added in v0.0.85

func CreateColumn(db *sql.DB, schema, table, name, kind, defaultValue string) error

Create column

func CreateDatabase added in v0.0.85

func CreateDatabase(db *sql.DB, name string) error

Crate database

func CreateIndex added in v0.0.85

func CreateIndex(db *sql.DB, schema, table, field string) error

Create index

func CreateSchema added in v0.0.85

func CreateSchema(db *sql.DB, name string) error

Create schema

func CreateSerie added in v0.0.85

func CreateSerie(db *sql.DB, schema, tag string) error

Create serie

func CreateTrigger added in v0.0.108

func CreateTrigger(db *sql.DB, schema, table, name, when, event, function string) error

Create trigger

func CreateUser added in v0.0.85

func CreateUser(db *sql.DB, name, password string) error

Create user

func DBClose

func DBClose(idx int) error

func DBQuery

func DBQuery(db *sql.DB, sql string, args ...any) (et.Items, error)

DBQUERY database query

func DBQueryOne

func DBQueryOne(db *sql.DB, sql string, args ...any) (et.Item, error)

func DropColumn added in v0.0.107

func DropColumn(db *sql.DB, schema, table, name string) error

Drop column

func DropDatabase added in v0.0.107

func DropDatabase(db *sql.DB, name string) error

Drop database

func DropIndex added in v0.0.107

func DropIndex(db *sql.DB, schema, table, field string) error

Drop index

func DropSchema added in v0.0.107

func DropSchema(db *sql.DB, name string) error

Drop schema

func DropSerie added in v0.0.108

func DropSerie(db *sql.DB, schema, name string) error

Drop serie

func DropTable added in v0.0.107

func DropTable(db *sql.DB, schema, name string) error

Drop table

func DropTrigger added in v0.0.108

func DropTrigger(db *sql.DB, schema, table, name string) error

Drop trigger

func DropUser added in v0.0.107

func DropUser(db *sql.DB, name string) error

Drop user

func ExistColum added in v0.0.85

func ExistColum(db *sql.DB, schema, table, name string) (bool, error)

Exist column

func ExistDatabase added in v0.0.85

func ExistDatabase(db *sql.DB, name string) (bool, error)

Exist database

func ExistIndex added in v0.0.85

func ExistIndex(db *sql.DB, schema, table, field string) (bool, error)

Exist index

func ExistSchema added in v0.0.85

func ExistSchema(db *sql.DB, name string) (bool, error)

Exist schema

func ExistSerie added in v0.0.85

func ExistSerie(db *sql.DB, schema, name string) (bool, error)

Exist serie

func ExistTable added in v0.0.85

func ExistTable(db *sql.DB, schema, name string) (bool, error)

Exist table

func ExistTrigger added in v0.0.108

func ExistTrigger(db *sql.DB, schema, table, name string) (bool, error)

Exist trigger

func ExistUser added in v0.0.85

func ExistUser(db *sql.DB, name string) (bool, error)

Exist user

func HttpQuery added in v0.0.34

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

* * *

func IDXQuery added in v0.0.159

func IDXQuery(index int, sql string, args ...any) (et.Items, error)

func IDXQueryAtrib added in v0.0.159

func IDXQueryAtrib(index int, sql, atrib string, args ...any) (et.Items, error)

func IDXQueryAtribOne added in v0.0.159

func IDXQueryAtribOne(index int, sql, atrib string, args ...any) (et.Item, error)

func IDXQueryCount added in v0.0.159

func IDXQueryCount(index int, sql string, args ...any) int

func IDXQueryData added in v0.0.159

func IDXQueryData(index int, sql string, args ...any) (et.Items, error)

func IDXQueryDataOne added in v0.0.159

func IDXQueryDataOne(index int, sql string, args ...any) (et.Item, error)

func IDXQueryOne added in v0.0.159

func IDXQueryOne(index int, sql string, args ...any) (et.Item, error)

func QDDL

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

* * Query *

func Query

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

func QueryAtrib

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

func QueryAtribOne

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

func QueryCount

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

func QueryData

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

func QueryDataOne

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

func QueryOne

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

func SQLDDL

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

SQLDDL SQL Data Definition Language

func SQLParse

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

SQLParse SQL Parse

func SQLQuote

func SQLQuote(sql string) string

SQLQuote quote SQL

func UpdateParamdb added in v0.0.107

func UpdateParamdb(path, atrib, value string) (et.Item, error)

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
	Connection  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() et.Json

Jump to

Keyboard shortcuts

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