dialects

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse added in v1.1.0

func Parse(name string) (d sqlbuilder.Dialect, ok bool)

Parse examines the name given to determine which dialect to use, accepts the following cases:

Dialect  | Names, aliases...
-------------------------------------
MySQL    | mysql, mariadb
Postgres | postgres, postgresql, pg
Sqlite   | sqlite, sqlite3
Testing  | testing, test

Types

type MySql

type MySql struct{}

func (MySql) BindVar

func (m MySql) BindVar(i int) string

func (MySql) ColumnOptionToString

func (m MySql) ColumnOptionToString(co *sb.ColumnOption) (string, error)

func (MySql) ColumnTypeToString

func (m MySql) ColumnTypeToString(cc sb.ColumnConfig) (string, error)

func (MySql) Name added in v1.1.0

func (m MySql) Name() string

func (MySql) QuerySuffix

func (m MySql) QuerySuffix() string

func (MySql) QuoteField

func (m MySql) QuoteField(field interface{}) string

func (MySql) TableOptionToString

func (m MySql) TableOptionToString(to *sb.TableOption) (string, error)

type Postgresql

type Postgresql struct{}

func (Postgresql) BindVar

func (m Postgresql) BindVar(i int) string

func (Postgresql) ColumnOptionToString

func (m Postgresql) ColumnOptionToString(co *sb.ColumnOption) (string, error)

func (Postgresql) ColumnTypeToString

func (m Postgresql) ColumnTypeToString(cc sb.ColumnConfig) (string, error)

func (Postgresql) Name added in v1.1.0

func (m Postgresql) Name() string

func (Postgresql) QuerySuffix

func (m Postgresql) QuerySuffix() string

func (Postgresql) QuoteField

func (m Postgresql) QuoteField(field interface{}) string

func (Postgresql) TableOptionToString

func (m Postgresql) TableOptionToString(to *sb.TableOption) (string, error)

type Sqlite

type Sqlite struct{}

func (Sqlite) BindVar

func (m Sqlite) BindVar(i int) string

func (Sqlite) ColumnOptionToString

func (m Sqlite) ColumnOptionToString(co *sb.ColumnOption) (string, error)

func (Sqlite) ColumnTypeToString

func (m Sqlite) ColumnTypeToString(cc sb.ColumnConfig) (string, error)

func (Sqlite) Name added in v1.1.0

func (m Sqlite) Name() string

func (Sqlite) QuerySuffix

func (m Sqlite) QuerySuffix() string

func (Sqlite) QuoteField

func (m Sqlite) QuoteField(field interface{}) string

func (Sqlite) TableOptionToString

func (m Sqlite) TableOptionToString(to *sb.TableOption) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL