Documentation ¶
Index ¶
- Constants
- func ChangePassword(db *DB, name, password string) error
- func Close() error
- func CreateColumn(db *DB, schema, table, name, kind, defaultValue string) error
- func CreateDatabase(db *DB, name string) error
- func CreateIndex(db *DB, schema, table, field string) error
- func CreateSchema(db *DB, name string) error
- func CreateSequence(db *DB, schema, tag string) error
- func CreateTrigger(db *DB, schema, table, name, when, event, function string) error
- func CreateUser(db *DB, name, password string) error
- func DropColumn(db *DB, schema, table, name string) error
- func DropDatabase(db *DB, name string) error
- func DropIndex(db *DB, schema, table, field string) error
- func DropSchema(db *DB, name string) error
- func DropSerie(db *DB, schema, name string) error
- func DropTable(db *DB, schema, name string) error
- func DropTrigger(db *DB, schema, table, name string) error
- func DropUser(db *DB, name string) error
- func ExistColum(db *DB, schema, table, name string) (bool, error)
- func ExistDatabase(db *DB, name string) (bool, error)
- func ExistIndex(db *DB, schema, table, field string) (bool, error)
- func ExistSchema(db *DB, name string) (bool, error)
- func ExistSerie(db *DB, schema, name string) (bool, error)
- func ExistTable(db *DB, schema, name string) (bool, error)
- func ExistTrigger(db *DB, schema, table, name string) (bool, error)
- func ExistUser(db *DB, name string) (bool, error)
- func InitCore(db *DB) error
- func LastSerie(tag string) int
- func NextCode(tag, prefix string) string
- func NextSerie(tag string) int
- func SQLDDL(sql string, args ...any) string
- func SQLParse(sql string, args ...any) string
- func SQLQuote(sql string) string
- func SetSerie(tag string, val int) (int, error)
- type DB
- func (c *DB) Close() error
- func (d *DB) Command(sql string, args ...any) (et.Item, error)
- func (c *DB) Describe() et.Json
- func (d *DB) GetCommand(id string) (et.Item, error)
- func (d *DB) Query(sql string, args ...any) (et.Items, error)
- func (d *DB) QueryOne(sql string, args ...any) (et.Item, error)
- func (d *DB) SetCommand(query string) error
- func (db *DB) SetListen(channels []string, listen HandlerListend)
- func (d *DB) SetMutex(id, query string, index int64) error
- func (d *DB) Source(sourceField string, sql string, args ...any) (et.Items, error)
- func (d *DB) SourceOne(sourceField string, sql string, args ...any) (et.Item, error)
- func (d *DB) SyncCommand() error
- type HandlerListend
Constants ¶
const Postgres = "postgres"
Variables ¶
This section is empty.
Functions ¶
func ChangePassword ¶ added in v0.0.85
Changue password
func CreateColumn ¶ added in v0.0.85
Create column
func CreateDatabase ¶ added in v0.0.85
Crate database
func CreateIndex ¶ added in v0.0.85
Create index
func CreateSequence ¶ added in v0.0.169
Create serie
func CreateTrigger ¶ added in v0.0.108
Create trigger
func DropColumn ¶ added in v0.0.107
Drop column
func DropTrigger ¶ added in v0.0.108
Drop trigger
func ExistColum ¶ added in v0.0.85
Exist column
func ExistDatabase ¶ added in v0.0.85
Exist database
func ExistIndex ¶ added in v0.0.85
Exist index
func ExistSchema ¶ added in v0.0.85
Exist schema
func ExistSerie ¶ added in v0.0.85
Exist serie
func ExistTable ¶ added in v0.0.85
Exist table
func ExistTrigger ¶ added in v0.0.108
Exist trigger
Types ¶
type DB ¶
type DB struct { Description string Driver string Host string Port int Dbname string Connection string UseCore bool // contains filtered or unexported fields }
func (*DB) Command ¶ added in v0.0.174
* * Command * @param db *DB * @param sql string * @param args ...any * @return et.Items * @return error *
func (*DB) GetCommand ¶ added in v0.0.174
* * GetCommand * @params id string * @return js.Item * @return error *
func (*DB) Query ¶ added in v0.0.174
* * Query * @param db *DB * @param sql string * @param args ...any * @return et.Items * @return error *
func (*DB) QueryOne ¶ added in v0.0.174
* * QueryOne * @param db *DB * @param sql string * @param args ...any * @return et.Item * @return error *
func (*DB) SetCommand ¶ added in v0.0.174
* * SetCommand * @params query string *
func (*DB) SetListen ¶ added in v0.0.174
func (db *DB) SetListen(channels []string, listen HandlerListend)
* * SetListen * @param channels []string * @param listen HandlerListend *
func (*DB) SetMutex ¶ added in v0.0.174
* * SetMutex * @params id string * @params query string * @params index int64 * @return error *
func (*DB) Source ¶ added in v0.0.174
* * Source * @param db *DB * @param sourceField string * @param sql string * @param args ...any * @return et.Items * @return error *
func (*DB) SourceOne ¶ added in v0.0.174
* * SourceOne * @param db *DB * @param sourceField string * @param sql string * @param args ...any * @return et.Item * @return error *
func (*DB) SyncCommand ¶ added in v0.0.174
* * SyncCommand * @return error *