Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedDialects = map[string]Provider{ "postgres": &PostgresDialect{}, "sqlite3": &Sqlite3Dialect{}, "mysql": &MysqlDialect{}, "sqlserver": &SqlserverDialect{}, }
Functions ¶
This section is empty.
Types ¶
type InsertMethod ¶
type InsertMethod int
const ( InsertWithReturning InsertMethod = iota InsertWithOutput InsertWithLastInsertID InsertWithNoIDRetrieval )
type MysqlDialect ¶
type MysqlDialect struct{}
func (MysqlDialect) DriverName ¶
func (MysqlDialect) DriverName() string
func (MysqlDialect) Escape ¶
func (MysqlDialect) Escape(str string) string
func (MysqlDialect) InsertMethod ¶
func (MysqlDialect) InsertMethod() InsertMethod
func (MysqlDialect) Placeholder ¶
func (MysqlDialect) Placeholder(idx int) string
type PostgresDialect ¶
type PostgresDialect struct{}
func (PostgresDialect) DriverName ¶
func (PostgresDialect) DriverName() string
func (PostgresDialect) Escape ¶
func (PostgresDialect) Escape(str string) string
func (PostgresDialect) InsertMethod ¶
func (PostgresDialect) InsertMethod() InsertMethod
func (PostgresDialect) Placeholder ¶
func (PostgresDialect) Placeholder(idx int) string
type Provider ¶
type Provider interface { InsertMethod() InsertMethod Escape(str string) string Placeholder(idx int) string DriverName() string }
Provider or dialect.Provider represents one particular way of writing SQL queries.
Different DBAdapters will use require different dialects to work.
type Sqlite3Dialect ¶
type Sqlite3Dialect struct{}
func (Sqlite3Dialect) DriverName ¶
func (Sqlite3Dialect) DriverName() string
func (Sqlite3Dialect) Escape ¶
func (Sqlite3Dialect) Escape(str string) string
func (Sqlite3Dialect) InsertMethod ¶
func (Sqlite3Dialect) InsertMethod() InsertMethod
func (Sqlite3Dialect) Placeholder ¶
func (Sqlite3Dialect) Placeholder(idx int) string
type SqlserverDialect ¶
type SqlserverDialect struct{}
func (SqlserverDialect) DriverName ¶
func (SqlserverDialect) DriverName() string
func (SqlserverDialect) Escape ¶
func (SqlserverDialect) Escape(str string) string
func (SqlserverDialect) InsertMethod ¶
func (SqlserverDialect) InsertMethod() InsertMethod
func (SqlserverDialect) Placeholder ¶
func (SqlserverDialect) Placeholder(idx int) string
Click to show internal directories.
Click to hide internal directories.