dialects

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DataTypeBlob   = DataType("blob")
	DataTypeString = DataType("string")
	DataTypeText   = DataType("text")
	DataTypeEnum   = DataType("enum")

	DataTypeBoolean = DataType("bool")

	DataTypeDate     = DataType("date")
	DataTypeDateTime = DataType("date-time")

	DataTypeFloat32 = DataType("float32")
	DataTypeFloat64 = DataType("float64")

	DataTypeInt8  = DataType("int8")
	DataTypeInt16 = DataType("int16")
	DataTypeInt32 = DataType("int32")
	DataTypeInt64 = DataType("int64")

	DataTypeUInt8  = DataType("uint8")
	DataTypeUInt16 = DataType("uint16")
	DataTypeUInt32 = DataType("uint32")
	DataTypeUInt64 = DataType("uint64")

	DataTypeJSON = DataType("json")
)

Variables

This section is empty.

Functions

func SetDefaultDialect

func SetDefaultDialect(dialectFactory func() Dialect)

Types

type Config added in v0.8.0

type Config interface {
	DriverName() string
	DataSourceName() string
	SetDialect()
}

type DataType

type DataType string

func (DataType) IsValid

func (d DataType) IsValid() bool

type DataTyper

type DataTyper interface {
	DataType() DataType
}

DataTyper must not be implemented on an interface

type Dialect

type Dialect interface {
	Identifier(string) string
	DataType(DataType) string
	CurrentTime() string
	AutoIncrement() string
	Escape(v any) string
	Binding() string
}

func New

func New() Dialect

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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