Documentation
¶
Index ¶
- Variables
- type AST
- type ASTResult
- type ASTs
- type Database
- type Option
- type ParseResult
- type Parser
- func (p *Parser) Astify(sql string, opts ...Option) (ASTResult, error)
- func (p *Parser) ColumnList(sql string, opts ...Option) ([]string, error)
- func (p *Parser) Parse(sql string, opts ...Option) (ParseResult, error)
- func (p *Parser) Sqlify(ast ASTResult, opts ...Option) (string, error)
- func (p *Parser) TableList(sql string, opts ...Option) ([]string, error)
- func (p *Parser) WhiteListCheck(sql string, whiteList []string, opts ...Option) error
- type TableColumnList
Constants ¶
This section is empty.
Variables ¶
View Source
var Databases = []Database{ Athena, BigQuery, DB2, FlinkSQL, Hive, MariaDB, MySQL, Noql, PostgreSQL, Redshift, Snowflake, Sqlite, TransactSQL, Trino, }
View Source
var (
ErrParserNotInitialized = fmt.Errorf("parser not initialized")
)
Functions ¶
This section is empty.
Types ¶
type Database ¶ added in v0.3.0
type Database string
const ( Athena Database = "athena" BigQuery Database = "bigquery" DB2 Database = "db2" FlinkSQL Database = "flinksql" Hive Database = "hive" MariaDB Database = "mariadb" MySQL Database = "mysql" Noql Database = "noql" PostgreSQL Database = "postgresql" Redshift Database = "redshift" Snowflake Database = "snowflake" Sqlite Database = "sqlite" TransactSQL Database = "transactsql" Trino Database = "trino" )
type Option ¶ added in v0.3.0
func WithDatabase ¶ added in v0.3.0
type ParseResult ¶ added in v0.3.0
type ParseResult *internal.ParseResult
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ColumnList ¶
type TableColumnList ¶ added in v0.3.0
type TableColumnList *internal.TableColumnList
Click to show internal directories.
Click to hide internal directories.