# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FromContext returns a *Database from a context.Context or nil if none is present.
GetOrCreateTxFromContext returns a *Tx from a context.Context or creates a new one if none is present.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InterpolateParams replaces the `@@` parameters in a query with their values from the map(s) Takes multiple "sets" of params for convenience, so we don't have to specify params if there aren't any, but each param will override the values of the previous.
No description provided by the author
New creates a new Database.
NewContext returns a new context.Context with the given *Database.
NewContextWithFunc returns a new context.Context with the given func () *Database This can be useful if you only want to initialize the database when it is actually needed.
NewContextWithTx returns a new context.Context with the given *Tx.
NewFromDSN creates a new Database from config DSN strings for both connections.
No description provided by the author
StructFieldIndexes recursively gets all the struct field index, including the indexes from embedded structs.
No description provided by the author
TxFromContext returns a *Tx from a context.Context or nil if none is present.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxExecutionTime is the total time we would like our queries to be able to execute.
No description provided by the author
4kB.
No description provided by the author
# Type aliases
FinishedFunc executes after all rows have been processed, including being read from the channel if used.
HandleRedisError is executed on a redis error, so it can be handled by the user return false to let the function return the error, or return to let the function continue executing despite the redis error.
LogFunc is called after the query executes.
No description provided by the author
No description provided by the author
Params are a map of paramterer names to values use in the query like `select @@Name`.
Raw is a literal MySQL string, not to be encoded or escaped in any way.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author