Comments (18)
tidb最新版本没有parser_driver包,应该依赖那个版本啊
from parser.
hello @464319127
sorry, you should add this import in head of hello.go
import _ "github.com/pingcap/tidb/types/parser_driver"
The reason why we should add this import
is that we want to decouple parser
's value expresion implement from tidb
(so other also can have their own value expression impl), so we need import the driver package to choose tidb's value expression impl if we want to use tidb's impl(just like choose mysql sql driver).
maybe we should add a developer usage example for parser and provide better panic message @tiancaiamao
from parser.
go get -u github.com/pingcap/tidb@master
why cannot " go get github.com/pingcap/[email protected]"?
from parser.
@tiancaiamao @lysu PTAL
from parser.
@lysu thanks a lot. It works now.
from parser.
import _ "github.com/pingcap/tidb/types/parser_driver"
when I add the import in head, the go mod default require the [email protected]+incompatible
.
But there is no tidb/types/parser_driver
in [email protected]+incompatible
.
So I use go get github.com/pingcap/tidb@master
to get it. Then I modify the go.mod
require (
github.com/pingcap/parser v0.0.0-20181120072820-10951bcfca73
github.com/pingcap/tidb v0.0.0-20181120082053-012cb6da9443
)
from parser.
这个parser拆的也太不清真了吧, 要使用还要 go get tidb
驱动为啥不放在parser里
from parser.
@winjeg
For dependencies, see the top description of value_expr.go
from parser.
Now it's not working according to the offical document, I was lead back here by the error print in my co nsole.
no such package github.com/pingcap/tidb/types/parser_driver
in tidb now
from parser.
Try this command:
go get -u github.com/pingcap/tidb@master
from parser.
Try this command:
go get -u github.com/pingcap/tidb@master
Didn't works,got error
go get: error loading module requirements
from parser.
go get -u github.com/pingcap/tidb@master
why cannot " go get github.com/pingcap/[email protected]"?
Good question. master
currently points at [email protected]
which claims to be from April 4th, but isn't a release/tag: https://github.com/pingcap/tidb/tags
from parser.
I am guessing that parser_driver
is deleted in tidb?
go: finding module for package github.com/pingcap/tidb/types/parser_driver
main.go:7:2: module github.com/pingcap/tidb@latest found (v2.0.11+incompatible), but does not contain package github.com/pingcap/tidb/types/parser_driver
from parser.
I solved a first error with #812, and I got this error again:
go: finding module for package github.com/pingcap/tidb/types/parser_driver
main.go:7:2: module github.com/pingcap/tidb@latest found (v2.0.11+incompatible), but does not contain package github.com/pingcap/tidb/types/parser_driver
Compilation finished with exit code 1
My import:
import (
"fmt"
"github.com/pingcap/parser"
"github.com/pingcap/parser/ast"
_ "github.com/pingcap/tidb/types/parser_driver"
)
from parser.
For anyone who has this issue, please see my comments here.
from parser.
import _ "github.com/pingcap/parser/test_driver"
from parser.
no bady update quickstart? and reslove this problem?
from parser.
import (
_ "github.com/pingcap/tidb/pkg/parser/test_driver"
)
from parser.
Related Issues (20)
- how to get the table names from BinaryOperationExpr of where clause HOT 2
- cannot run the demo in README.md because of broken dependencies HOT 1
- The Collate in types.FieldType in ColumnDef seems to be always empty
- Invalid characters generated by goyacc? HOT 2
- how can use "with xx select" syntax HOT 4
- Parsing errors from mysqldump 8.0
- Error parsing default values for tables
- Provide an interface for other packages to obtain the provided symbol type
- Is it possible to extract table and its related columns from sql query? HOT 2
- Test_driver failed to process escaped char in string literal
- Mention this repo has been moved to pingcap/tidb HOT 1
- Ss
- Parsing errors from mysql dump HOT 4
- question: why SelectStmt do not have the WHERE condition(Clause) but only the ExprNode ? HOT 3
- Optimize parser performance HOT 1
- How to beautify sql with this package ? HOT 4
- Window Function syntax error
- Node.OriginTextPosition() always return 0 and Text() return empty
- The current parser does not support multi-statement SQL parsing. Is there any alternative method to solve this problem?
- character token too long: "identifier" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parser.