We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how do I call TiParser lexer for sql word split just like vitess token not ast parser, the sample code is as follows
var tokens []Token tkn := sqlparser.NewStringTokenizer(sql) typ, val := tkn.Scan()
The text was updated successfully, but these errors were encountered:
Here is an example:
cat example_test.go
package parser import ( "fmt" . "github.com/pingcap/check" ) var _ = Suite(&testExampleSuite{}) type testExampleSuite struct { } func (s *testExampleSuite) TestExample(c *C) { l := NewScanner("create table t (a int);") var v yySymType for { result := l.Lex(&v) if result == 0 || result == invalid { break } fmt.Printf("%d\n", result) } }
go test -v github.com/pingcap/parser -check.f TestExample
=== RUN TestT 57382 57531 57346 40 57346 57446 41 59 PASS: example_test.go:13: testExampleSuite.TestExample 0.001s
The meaning of these numbers can be found in parser.go.
parser.go
Sorry, something went wrong.
yySymType is a private struct, how can i use it in my program?
No branches or pull requests
Question
how do I call TiParser lexer for sql word split just like vitess token not ast parser, the sample code is as follows
The text was updated successfully, but these errors were encountered: