Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotConnected = errors.New("db connection: db is not yet connected")
)
Functions ¶
func PreStmtExec ¶
Execute a command using a Stmt pre-created
Types ¶
type ExtractorFunc ¶
This type of function convert a any struct to an slice of the necessary data to do the db query
type QueryResult ¶
type QueryResult struct {
// contains filtered or unexported fields
}
The result of a query will return a array with all the rows obtained
func PreStmtQuery ¶
func PreStmtQuery(stmt *sql.Stmt, ef ExtractorFunc, values ...any) (*QueryResult, error)
Execute a query using a Stmt pre-created
func StmtQuery ¶
func StmtQuery(query string, ef ExtractorFunc, values ...any) (*QueryResult, error)
Execute a query using a given string
func (*QueryResult) Rows ¶
func (qr *QueryResult) Rows() [][]any
Returns an Array all the rows of the query
Click to show internal directories.
Click to hide internal directories.