sqlparser

package
Version: v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SELECT = "select"
	INSERT = "insert"
	UPDATE = "update"
	DELETE = "delete"
)

Variables

This section is empty.

Functions

func MysqlMarker added in v0.2.3

func MysqlMarker(int) string

func Oci8Marker added in v0.2.3

func Oci8Marker(i int) string

func PostgresMarker added in v0.2.3

func PostgresMarker(i int) string

func RegisterParamMarker added in v0.2.3

func RegisterParamMarker(driverName string, h Holder) bool

Types

type Holder added in v0.2.3

type Holder func(int) string

func GetMarker added in v0.2.3

func GetMarker(driverName string) (Holder, bool)

func SelectMarker added in v0.2.3

func SelectMarker(driverName string) Holder

type Metadata

type Metadata struct {
	Action     string
	PrepareSql string
	Vars       []string
	Params     []interface{}
}

func ParseWithParamMap

func ParseWithParamMap(driverName, sql string, params map[string]interface{}) (*Metadata, error)

func ParseWithParams

func ParseWithParams(sql string, params ...interface{}) (*Metadata, error)

func SimpleParse

func SimpleParse(sql string) (*Metadata, error)

func (*Metadata) String

func (md *Metadata) String() string

type SqlParser added in v0.2.1

type SqlParser interface {
	ParseMetadata(driverName string, params ...interface{}) (*Metadata, error)
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL