Giter Site home page Giter Site logo

Comments (8)

tzq0301 avatar tzq0301 commented on June 26, 2024

+1

from datatypes.

tzq0301 avatar tzq0301 commented on June 26, 2024

Found in json.go, but unable to use
image
image

from datatypes.

tzq0301 avatar tzq0301 commented on June 26, 2024

I think this problem maybe caused by the tag of this repository? Can you help update the tag v1.1.0 plz @jinzhu? thx a lot 😁

from datatypes.

dablelv avatar dablelv commented on June 26, 2024

Found in json.go, but unable to use image image

哪一个 tag 可以找到其定义?

from datatypes.

tzq0301 avatar tzq0301 commented on June 26, 2024

没有任何一个 tag 可以找到该定义,这好像是最近的 feature,还没被打 tag

@dablelv 试试 go get gorm.io/datatypes@c43177d3cf8c975e7eb504b76f23150e3c01d662

from datatypes.

dablelv avatar dablelv commented on June 26, 2024

没有任何一个 tag 可以找到该定义,这好像是最近的 feature,还没被打 tag

@dablelv 试试 go get gorm.io/datatypes@c43177d3cf8c975e7eb504b76f23150e3c01d662

明白了,最新的代码还没有打 tag。

不过我使用原生 sql 作为 GORM 的内联条件可以达到同样的目的:判断数组中是否包含某值。

db.Find(&rows, fmt.Sprintf(`json_contains(YOUR_COLUMN,'"%v"')`, YOUR_STR_VALUE))

from datatypes.

tzq0301 avatar tzq0301 commented on June 26, 2024

其实还是希望能支持能更多的 sql 数据库,目前好像只支持 mysql,我们用 sqlite 做单测的时候完全没法用

from datatypes.

alingse avatar alingse commented on June 26, 2024

v1.2.0 有了 https://github.com/go-gorm/datatypes/tags

from datatypes.

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.