Documentation
¶
Index ¶
Constants ¶
const ( // Int64ToBool casts an int64 type into a bool, // useful for handling SQLite INT -> BOOL. Int64ToBool coerceType StringToFloat )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoercePair ¶
type CoercePair struct { Column string Type coerceType }
CoercePair casts the scanned value in Column to another type.
type ConfigFunc ¶
type ConfigFunc func(*Config)
ConfigFunc manipulates a Config object.
func Coerce ¶
func Coerce(pairs ...CoercePair) ConfigFunc
Coerce accepts a map of column names that will be cast explicitly into the desired type.
func EscapeChar ¶
func EscapeChar(r rune) ConfigFunc
EscapeChar is a rune which column and table names will be escaped with. PostgreSQL and SQLite both accept double quotes "" while MariaDB/MySQL only accept backticks.
func Incrementing ¶
func Incrementing() ConfigFunc
Incrementing indicates the PostgreSQL variant of parameter markers will be used, e.g. $1..$2. The default style is ?..?.
func MySQL ¶
func MySQL() ConfigFunc
MySQL configures the query builder to generate SQL that is compatible with MySQL/MariaDB See github.com/go-sql-driver/mysql
func Postgres ¶
func Postgres() ConfigFunc
Postgres configures the query builder to generate SQL that is compatible with PostgreSQL. See github.com/lib/pq
func Precision ¶
func Precision(i int) ConfigFunc
Precision sets the precision float64 types will be rounded to when read from SQL.
func Query ¶
func Query(query string) ConfigFunc
Query is a Raw SQL statement which must return appropriate types which can be inferred and loaded into a new QFrame.
func SQLite ¶
func SQLite() ConfigFunc
SQLite configures the query builder to generate SQL that is compatible with SQLite3. See github.com/mattn/go-sqlite3
func Table ¶
func Table(table string) ConfigFunc
Table is the name of the table to be used for generating an INSERT statement.