sqlparser

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 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

This section is empty.

Types

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)
}

Jump to

Keyboard shortcuts

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