Documentation
¶
Index ¶
- Constants
- func ChangePassword(db *DB, name, password string) 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(db *DB, tag string) int
- func NextCode(db *DB, tag, prefix string) string
- func NextSerie(db *DB, tag string) int64
- func SQLDDL(sql string, args ...any) string
- func SQLParse(sql string, args ...any) string
- func SQLQuote(sql string) string
- func SetSerie(db *DB, tag string, val int) (int, error)
- func TipoSQL(query string) string
- type DB
- func (d *DB) Bulck(sql string, args ...any) error
- func (c *DB) Close() error
- func (d *DB) Command(sql string, args ...any) (et.Items, error)
- func (d *DB) CommandSource(sourceField string, sql string, args ...any) (et.Items, error)
- func (d *DB) Ddl(sql string, args ...any) error
- func (c *DB) Describe() et.Json
- func (c *DB) HealthCheck() bool
- func (d *DB) Query(sql string, args ...any) (et.Items, error)
- func (d *DB) QueryOne(sql string, args ...any) (et.Item, error)
- func (db *DB) SetListen(channels map[string]HandlerListend)
- func (d *DB) Source(sourceField string, sql string, args ...any) (et.Items, error)
- type HandlerListend
Constants ¶
View Source
const ( Postgres = "postgres" Oracle = "oracle" Mysql = "mysql" )
View Source
const ( EVENT_SQL_ERROR = "sql:error" EVENT_SQL_QUERY = "sql:query" EVENT_SQL_DDL = "sql:definition" EVENT_SQL_COMMAND = "sql:command" )
View Source
const (
KEY = "_id"
)
Variables ¶
This section is empty.
Functions ¶
func CreateColumn ¶
Create column
func CreateDatabase ¶
* * Created database component *
func CreateTrigger ¶
Create trigger
func ExistTrigger ¶
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) CommandSource ¶ added in v1.1.125
* * CommandSource * @param sourceField string, sql string, args ...any * @return et.Items, error *
func (*DB) HealthCheck ¶ added in v1.1.124
* * HealthCheck * @return bool *
func (*DB) SetListen ¶
func (db *DB) SetListen(channels map[string]HandlerListend)
* * SetListen * @param channels map[string]HandlerListend *
type HandlerListend ¶
Click to show internal directories.
Click to hide internal directories.