Versions in this module Expand all Collapse all v1 v1.0.1 Jul 26, 2026 v1.0.0 Jul 26, 2026 Changes in this version + const EXPLAIN + const FetchLimit + const SELECT + const SHOW + const TABLE + const VALUES + const WITH + func BuildDsn(userName, password, host, port, dbName, sslMode string) string + func GetDbName() string + type Backend struct + func Connect(cfg Config) (*Backend, error) + func (b *Backend) Close() error + func (b *Backend) ColumnIndexTypes(namespace, table string) (map[string]string, error) + func (b *Backend) ColumnsMeta(namespace, table string) ([]db.ColumnMeta, error) + func (b *Backend) CurrentNamespace() string + func (b *Backend) FetchTable(namespace, table string, limit int) (*data.Frame, error) + func (b *Backend) Kind() string + func (b *Backend) Namespaces() ([]string, error) + func (b *Backend) PrimaryKeys(namespace, table string) ([]string, error) + func (b *Backend) Run(stmt string) (db.Result, error) + func (b *Backend) Tables(namespace string) ([]string, error) + func (b *Backend) Title() string + type Config struct + DbName string + Host string + Password string + Port string + SslMode string + UserName string + func (c Config) Dsn() string + type DB struct + var DbClient *DB + func GetDB() *DB + func NewDB(dsn string, dbName string) (*DB, error) + func (db *DB) ColumnIndexTypes(schema, table string) (map[string]string, error) + func (db *DB) ColumnsMeta(schema, table string) ([]dbapi.ColumnMeta, error) + func (db *DB) FetchTableRecords(schema, table string) (fields []string, records [][]string, err error) + func (db *DB) ListPrimaryKeys(schema, table string) ([]string, error) + func (db *DB) ListSchemas() ([]string, error) + func (db *DB) ListTables(schema string) ([]string, error) + func (db *DB) RawExec(query string) (sql.Result, error) + func (db *DB) RawQuery(query string) (fields []string, records [][]string, err error) + func (db *DB) RawSqlCommand(query string) (rawCmdResult RawCommandResult, err error) + type RawCommandResult struct + Fields []string + IsDQL bool + Records [][]string + Result sql.Result