Giter VIP home page Giter VIP logo

Comments (18)

lwfofgit avatar lwfofgit commented on July 20, 2024 3

tidb最新版本没有parser_driver包,应该依赖那个版本啊

from parser.

lysu avatar lysu commented on July 20, 2024 2

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.

bugcai avatar bugcai commented on July 20, 2024 2
go get -u github.com/pingcap/tidb@master

why cannot " go get github.com/pingcap/[email protected]"?

from parser.

shenli avatar shenli commented on July 20, 2024

@tiancaiamao @lysu PTAL

from parser.

464319127 avatar 464319127 commented on July 20, 2024

@lysu thanks a lot. It works now.

from parser.

464319127 avatar 464319127 commented on July 20, 2024
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.

winjeg avatar winjeg commented on July 20, 2024

这个parser拆的也太不清真了吧, 要使用还要 go get tidb 驱动为啥不放在parser里

from parser.

rarpainting avatar rarpainting commented on July 20, 2024

@winjeg
For dependencies, see the top description of value_expr.go

from parser.

winjeg avatar winjeg commented on July 20, 2024

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.

tiancaiamao avatar tiancaiamao commented on July 20, 2024

Try this command:

go get -u github.com/pingcap/tidb@master

@winjeg

from parser.

funlake avatar funlake commented on July 20, 2024

Try this command:

go get -u github.com/pingcap/tidb@master

@winjeg

Didn't works,got error
go get: error loading module requirements

from parser.

xeoncross avatar xeoncross commented on July 20, 2024
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.

didip avatar didip commented on July 20, 2024

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.

zhangysh1995 avatar zhangysh1995 commented on July 20, 2024

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.

zhangysh1995 avatar zhangysh1995 commented on July 20, 2024

For anyone who has this issue, please see my comments here.

from parser.

TerryLiu avatar TerryLiu commented on July 20, 2024

import _ "github.com/pingcap/parser/test_driver"

from parser.

dobet avatar dobet commented on July 20, 2024

no bady update quickstart? and reslove this problem?

from parser.

twz915 avatar twz915 commented on July 20, 2024
import (
	_ "github.com/pingcap/tidb/pkg/parser/test_driver"
)

from parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.