You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func main() {
astNode, err := parse("SELECT a, b FROM t")
if err != nil {
fmt.Printf("parse error: %v\n", err.Error())
return
}
fmt.Printf("%v\n", *astNode)
fmt.Println("sucesss")
}
github.com/pingcap/tidb/types/parser_driver
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:59:2: cannot use &ParamMarkerExpr literal (type *ParamMarkerExpr) as type ast.ParamMarkerExpr in assignment:
*ParamMarkerExpr does not implement ast.ParamMarkerExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:60:2: cannot use &ValueExpr literal (type *ValueExpr) as type ast.ValueExpr in assignment:
*ValueExpr does not implement ast.ValueExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:116:3: cannot use ve (type *ValueExpr) as type ast.ValueExpr in return argument:
*ValueExpr does not implement ast.ValueExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:122:2: cannot use ve (type *ValueExpr) as type ast.ValueExpr in return argument:
*ValueExpr does not implement ast.ValueExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:137:34: cannot use n (type *ValueExpr) as type ast.Node in argument to v.Enter:
*ValueExpr does not implement ast.Node (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:141:13: impossible type assertion:
*ValueExpr does not implement ast.Node (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:142:16: cannot use n (type *ValueExpr) as
The text was updated successfully, but these errors were encountered:
package main
import (
"fmt"
"github.com/pingcap/parser"
"github.com/pingcap/parser/ast"
_ "github.com/pingcap/tidb/types/parser_driver"
)
func parse(sql string) (*ast.StmtNode, error) {
p := parser.New()
}
func main() {
astNode, err := parse("SELECT a, b FROM t")
if err != nil {
fmt.Printf("parse error: %v\n", err.Error())
return
}
fmt.Printf("%v\n", *astNode)
fmt.Println("sucesss")
}
github.com/pingcap/tidb/types/parser_driver
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:59:2: cannot use &ParamMarkerExpr literal (type *ParamMarkerExpr) as type ast.ParamMarkerExpr in assignment:
*ParamMarkerExpr does not implement ast.ParamMarkerExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:60:2: cannot use &ValueExpr literal (type *ValueExpr) as type ast.ValueExpr in assignment:
*ValueExpr does not implement ast.ValueExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:116:3: cannot use ve (type *ValueExpr) as type ast.ValueExpr in return argument:
*ValueExpr does not implement ast.ValueExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:122:2: cannot use ve (type *ValueExpr) as type ast.ValueExpr in return argument:
*ValueExpr does not implement ast.ValueExpr (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:137:34: cannot use n (type *ValueExpr) as type ast.Node in argument to v.Enter:
*ValueExpr does not implement ast.Node (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:141:13: impossible type assertion:
*ValueExpr does not implement ast.Node (missing Restore method)
../../../../go/pkg/mod/github.com/pingcap/tidb@v0.0.0-20181120082053-012cb6da9443/types/parser_driver/value_expr.go:142:16: cannot use n (type *ValueExpr) as
The text was updated successfully, but these errors were encountered: