Documentation ¶
Index ¶
- func New(id common.RegDbID, url string) (common.Database, error)
- func NewInstance(id common.RegDbID, reference *common.Reference, password string) (common.Database, error)
- type Mysql
- func (mysql *Mysql) Batch(batch string) error
- func (mysql *Mysql) BatchSelect(batch string) ([][]interface{}, error)
- func (mysql *Mysql) BatchSelectFct(search *common.Query, fct common.ResultFunction) error
- func (mysql *Mysql) BeginTransaction() error
- func (mysql *Mysql) ByteArrayAvailable() bool
- func (mysql *Mysql) Clone() common.Database
- func (mysql *Mysql) Close()
- func (mysql *Mysql) Commit() error
- func (mysql *Mysql) CreateTable(name string, columns any) error
- func (mysql *Mysql) Delete(name string, remove *common.Entries) (int64, error)
- func (mysql *Mysql) DeleteTable(name string) error
- func (mysql *Mysql) EndTransaction(commit bool) (err error)
- func (mysql *Mysql) FreeHandler()
- func (mysql *Mysql) GetTableColumn(tableName string) ([]string, error)
- func (mysql *Mysql) ID() common.RegDbID
- func (mysql *Mysql) IndexNeeded() bool
- func (mysql *Mysql) Insert(name string, insert *common.Entries) ([][]any, error)
- func (mysql *Mysql) Maps() ([]string, error)
- func (mysql *Mysql) Open() (dbOpen any, err error)
- func (mysql *Mysql) Ping() error
- func (mysql *Mysql) Query(search *common.Query, f common.ResultFunction) (*common.Result, error)
- func (mysql *Mysql) Reference() (string, string)
- func (mysql *Mysql) Rollback() error
- func (mysql *Mysql) SetCredentials(user, password string) error
- func (mysql *Mysql) StartTransaction() (*sql.Tx, context.Context, error)
- func (mysql *Mysql) Stream(search *common.Query, sf common.StreamFunction) error
- func (mysql *Mysql) URL() string
- func (mysql *Mysql) Update(name string, insert *common.Entries) ([][]any, int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mysql ¶
type Mysql struct { common.CommonDatabase // contains filtered or unexported fields }
Mysql instance for MySQL
func (*Mysql) BatchSelect ¶
BatchSelect batch SQL query in table with values returned
func (*Mysql) BatchSelectFct ¶
BatchSelectFct batch SQL query in table with fct called
func (*Mysql) BeginTransaction ¶
StartTransaction start transaction the database connection
func (*Mysql) ByteArrayAvailable ¶
ByteArrayAvailable byte array available in SQL database
func (*Mysql) CreateTable ¶
CreateTable create a new table
func (*Mysql) DeleteTable ¶
DeleteTable delete a table
func (*Mysql) EndTransaction ¶
EndTransaction end the transaction and commit if commit parameter is true.
func (*Mysql) FreeHandler ¶
func (mysql *Mysql) FreeHandler()
FreeHandler don't use the driver anymore
func (*Mysql) GetTableColumn ¶
GetTableColumn get table columne names
func (*Mysql) IndexNeeded ¶
IndexNeeded index needed for the SELECT statement value reference
func (*Mysql) SetCredentials ¶
SetCredentials set credentials to connect to database
func (*Mysql) StartTransaction ¶
StartTransaction start transaction
Click to show internal directories.
Click to hide internal directories.