package
Version:
v0.0.0-...-ce87471
Opens a new window with list of versions in this module.
Published: Sep 10, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
type Db
-
func (dbIn *Db) Init(user string, passwd string, addr string, port int, dbName string)
-
func (dbIn *Db) Query(sql string, params []any, model RowModel) ([]RowModel, error)
-
func (dbIn *Db) QueryRow(sql string, params []any, model RowModel) (RowModel, error)
-
type RowModel
Db define database config and connection
Query query rows data from database
Returns slice of RowModels
QueryRow query one row data from database
Returns RowModel
type RowModel interface {
GetNewModel() RowModel
GetColumnPointers() []interface{}
}
RowModel define interface for model, created from on row of selected data
Source Files
¶
Click to show internal directories.
Click to hide internal directories.