dialect

package
v2.7.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialect

type Dialect interface {
	QuoteIdent(id string) string

	EncodeString(s string) string
	EncodeBool(b bool) string
	EncodeTime(t time.Time) string
	EncodeBytes(b []byte) string

	Placeholder(n int) string
}

Dialect abstracts database driver differences in encoding types, and placeholders.

var (
	// MySQL dialect
	MySQL Dialect = mysql{}
	// PostgreSQL dialect
	PostgreSQL Dialect = postgreSQL{}
	// SQLite3 dialect
	SQLite3 Dialect = sqlite3{}
	// MSSQL dialect
	MSSQL Dialect = mssql{}

	// use utc timezone by default
	Location = time.UTC
)

Jump to

Keyboard shortcuts

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