{"modulePath":"github.com/CodinGame/sqls","version":"v0.2.30","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parseutil\n\n## Functions\n\n```go\nfunc ExtractAliased(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractAliasedIdentifer(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractIdenfiers(parsed ast.TokenList, pos token.Pos) ([]ast.Node, error)\n```\n\n```go\nfunc ExtractInsertColumns(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractInsertValues(parsed ast.TokenList, pos token.Pos) []ast.Node\n```\n\n```go\nfunc ExtractSelectExpr(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractTableFactor(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractTableReference(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractTableReferences(parsed ast.TokenList) []ast.Node\n```\n\n```go\nfunc ExtractWhereCondition(parsed ast.TokenList) []ast.Node\n```\n\n## Types\n\n```go\ntype Insert struct {\n\tTables  []*TableInfo\n\tColumns []*ast.IdentiferList\n\tValues  []*ast.IdentiferList\n}\n```\n\n```go\nfunc ExtractInsert(parsed ast.TokenList, pos token.Pos) (*Insert, error)\n```\n\n```go\nfunc (i *Insert) Enable() bool\n```\n\n```go\nfunc (i *Insert) GetColumns() *ast.IdentiferList\n```\n\n```go\nfunc (i *Insert) GetTable() *TableInfo\n```\n\n```go\nfunc (i *Insert) GetValues() *ast.IdentiferList\n```\n\n```go\ntype NodeWalker struct {\n\tPaths []*astutil.NodeReader\n\tIndex int\n}\n```\n\n```go\nfunc NewNodeWalker(root ast.TokenList, pos token.Pos) *NodeWalker\n```\n\n```go\nfunc (nw *NodeWalker) CurNodeButtomMatched(matcher astutil.NodeMatcher) ast.Node\n```\n\n```go\nfunc (nw *NodeWalker) CurNodeDepth(matcher astutil.NodeMatcher) (int, bool)\n```\n\n```go\nfunc (nw *NodeWalker) CurNodeIs(matcher astutil.NodeMatcher) bool\n```\n\n```go\nfunc (nw *NodeWalker) CurNodeMatches(matcher astutil.NodeMatcher) []ast.Node\n```\n\n```go\nfunc (nw *NodeWalker) CurNodeTopMatched(matcher astutil.NodeMatcher) ast.Node\n```\n\n```go\nfunc (nw *NodeWalker) CurNodes() []ast.Node\n```\n\n```go\nfunc (nw *NodeWalker) PrevNodes(ignoreWitespace bool) []ast.Node\n```\n\n```go\nfunc (nw *NodeWalker) PrevNodesIs(ignoreWitespace bool, matcher astutil.NodeMatcher) bool\n```\n\n```go\nfunc (nw *NodeWalker) PrevNodesIsWithDepth(ignoreWitespace bool, matcher astutil.NodeMatcher, depth int) bool\n```\n\n```go\ntype SubQueryColumn struct {\n\tParentTable *TableInfo\n\tParentName  string\n\tColumnName  string\n\tAliasName   string\n}\n```\n\n```go\nfunc (sc *SubQueryColumn) DisplayName() string\n```\n\n```go\ntype SubQueryInfo struct {\n\tName  string\n\tViews []*SubQueryView\n}\n```\n\n```go\nfunc ExtractSubQueryViews(parsed ast.TokenList, pos token.Pos) ([]*SubQueryInfo, error)\n```\n\n```go\ntype SubQueryView struct {\n\tSubQueryColumns []*SubQueryColumn\n}\n```\n\n```go\ntype SyntaxPosition string\n```\n\n```go\nconst (\n\tColName        SyntaxPosition = \"col_name\"\n\tSelectExpr     SyntaxPosition = \"select_expr\"\n\tAliasName      SyntaxPosition = \"alias_name\"\n\tWhereCondition SyntaxPosition = \"where_conditon\"\n\tCaseValue      SyntaxPosition = \"case_value\"\n\tTableReference SyntaxPosition = \"table_reference\"\n\tInsertColumn   SyntaxPosition = \"insert_column\"\n\tInsertValue    SyntaxPosition = \"insert_value\"\n\tUnknown        SyntaxPosition = \"unknown\"\n)\n```\n\n```go\nfunc CheckSyntaxPosition(nw *NodeWalker) SyntaxPosition\n```\n\n```go\ntype TableInfo struct {\n\tDatabaseSchema  string\n\tName            string\n\tAlias           string\n\tSubQueryColumns []*SubQueryColumn\n}\n```\n\n```go\nfunc ExtractTable(parsed ast.TokenList, pos token.Pos) ([]*TableInfo, error)\n```\n\n","path":"github.com/CodinGame/sqls/parser/parseutil","name":"parseutil","synopsis":"","isRedistributable":true}
