sqlparser

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 15 Imported by: 13

README

sqlparser

SQL Parser

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(cursor *parsly.Cursor, dest interface{}) error

func ParseCallExpr

func ParseCallExpr(rawExpr string) (*expr.Call, error)

func ParseCreateTable

func ParseCreateTable(SQL string) (*table.Create, error)

func ParseDelete

func ParseDelete(SQL string) (*del.Statement, error)

func ParseDropTable

func ParseDropTable(SQL string) (*table.Drop, error)

func ParseInsert

func ParseInsert(SQL string) (*insert.Statement, error)

func ParseList

func ParseList(raw string) (query.List, error)

ParseList parses list

func ParseLiteral

func ParseLiteral(cursor *parsly.Cursor) (*expr.Literal, error)

func ParseQualify

func ParseQualify(cursor *parsly.Cursor, qualify *expr.Qualify) error

ParseQualify parses qualify expr

func ParseQuery

func ParseQuery(SQL string) (*query.Select, error)

func ParseUpdate

func ParseUpdate(SQL string) (*update.Statement, error)

func Stringify

func Stringify(n node.Node) string

func TableName

func TableName(node node.Node) string

TableName returns main table name

func TryParseLiteral

func TryParseLiteral(cursor *parsly.Cursor) (*expr.Literal, error)

Types

type Token

type Token int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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