dialect

package
v0.2.30 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataBaseFunctions

func DataBaseFunctions(driver DatabaseDriver) []string

func DataBaseKeywords

func DataBaseKeywords(driver DatabaseDriver) []string

Types

type DatabaseDriver

type DatabaseDriver string
const (
	DatabaseDriverMySQL      DatabaseDriver = "mysql"
	DatabaseDriverMySQL8     DatabaseDriver = "mysql8"
	DatabaseDriverMySQL57    DatabaseDriver = "mysql57"
	DatabaseDriverMySQL56    DatabaseDriver = "mysql56"
	DatabaseDriverPostgreSQL DatabaseDriver = "postgresql"
	DatabaseDriverSQLite3    DatabaseDriver = "sqlite3"
	DatabaseDriverMssql      DatabaseDriver = "mssql"
	DatabaseDriverOracle     DatabaseDriver = "oracle"
	DatabaseDriverH2         DatabaseDriver = "h2"
)

type Dialect

type Dialect interface {
	IsIdentifierStart(r rune) bool
	IsIdentifierPart(r rune) bool
	IsDelimitedIdentifierStart(r rune) bool
	IsPlaceHolderStart(r rune) bool
	IsPlaceHolderPart(r rune) bool
}

type GenericSQLDialect

type GenericSQLDialect struct {
}

func (*GenericSQLDialect) IsDelimitedIdentifierStart

func (*GenericSQLDialect) IsDelimitedIdentifierStart(r rune) bool

func (*GenericSQLDialect) IsIdentifierPart

func (*GenericSQLDialect) IsIdentifierPart(r rune) bool

func (*GenericSQLDialect) IsIdentifierStart

func (*GenericSQLDialect) IsIdentifierStart(r rune) bool

func (*GenericSQLDialect) IsPlaceHolderPart

func (*GenericSQLDialect) IsPlaceHolderPart(r rune) bool

func (*GenericSQLDialect) IsPlaceHolderStart

func (*GenericSQLDialect) IsPlaceHolderStart(r rune) bool

type KeywordKind

type KeywordKind int
const (
	// Matched keyword
	Matched KeywordKind = iota
	// Data Manipulation Language
	DML
	// Data Definition Language
	DDL
	// Data Control Language
	DCL
	// Unmatched keyword (like table and column identifier)
	Unmatched = 99
)

func MatchKeyword

func MatchKeyword(upperWord string) KeywordKind

Jump to

Keyboard shortcuts

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