dialect

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: Apache-2.0 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 {
	// GetName get dialect's name
	GetName() string

	// ShowColumns show columns of specified table
	ShowColumns(table string) string

	// ShowTables show tables of database
	ShowTables() string

	// Insert
	Insert(comp *SqlComponent) string

	// Delete
	Delete(comp *SqlComponent) string

	// Update
	Update(comp *SqlComponent) string

	// Select
	Select(comp *SqlComponent) string
}

func GetDialect

func GetDialect() Dialect

func GetDialectByDriver

func GetDialectByDriver(driver string) Dialect

type H

type H map[string]interface{}

type Join

type Join struct {
	Table     string
	FieldA    string
	Operation string
	FieldB    string
}

type RawUpdate

type RawUpdate struct {
	Expression string
	Args       []interface{}
}

type SqlComponent

type SqlComponent struct {
	Fields     []string
	TableName  string
	Wheres     []Where
	Leftjoins  []Join
	Args       []interface{}
	Order      string
	Offset     string
	Limit      string
	WhereRaws  string
	UpdateRaws []RawUpdate
	Statement  string
	Values     H
}

type Where

type Where struct {
	Operation string
	Field     string
	Qmark     string
}

Jump to

Keyboard shortcuts

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