mysql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrefabDatabases = "SHOW DATABASES"
	PrefabTables    = "SHOW TABLES FROM ?"
	PrefabColumns   = "SHOW COLUMNS FROM ?"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

type MySQL struct{}

func NewMySQLDriver

func NewMySQLDriver() (*MySQL, error)

func (*MySQL) Capabilities

func (m *MySQL) Capabilities() []database.Capabilities

// Capabilities implements database.Dialect.

func (*MySQL) ConnectionStringTemplate

func (m *MySQL) ConnectionStringTemplate() *template.Template

ConnectionStringTemplate implements database.SQLDialect. user:password@tcp(host:port)/dbname

func (*MySQL) GetPrefab

func (m *MySQL) GetPrefab(r database.Request) (string, []any, error)

GetPrefab implements database.SQLDialect.

func (*MySQL) GetTemplate

func (m *MySQL) GetTemplate(queryType database.RequestType) string

GetTemplate implements database.Dialect.

func (*MySQL) IncreamentPlaceholder

func (m *MySQL) IncreamentPlaceholder() string

IncreamentPlaceholder implements database.Dialect.

func (*MySQL) Name

func (m *MySQL) Name() string

Name implements database.SQLDialect.

func (*MySQL) Quote

func (m *MySQL) Quote(value string) string

Quote implements database.Dialect.

func (*MySQL) QuoteRune

func (m *MySQL) QuoteRune() rune

QuoteRune implements database.Dialect.

func (*MySQL) RenderCurrentTimestamp

func (m *MySQL) RenderCurrentTimestamp() string

RenderCurrentTimestamp implements database.Dialect.

func (*MySQL) RenderPlaceholder

func (m *MySQL) RenderPlaceholder(index int) string

RenderPlaceholder implements database.Dialect.

func (*MySQL) RenderTypeCast

func (m *MySQL) RenderTypeCast() string

RenderTypeCast implements database.Dialect.

func (*MySQL) RenderValue

func (m *MySQL) RenderValue(value any) string

RenderValue implements database.Dialect.

func (*MySQL) ResolveType

func (m *MySQL) ResolveType(dbType string, value []byte) (any, error)

ResolveType implements database.SQLDialect.

Jump to

Keyboard shortcuts

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