Giter Club home page Giter Club logo

Comments (5)

mehcode avatar mehcode commented on May 19, 2024 4

JSON for Postgres is in master. Thanks @oeb25! I'll spin out another issue for MySQL.

from sqlx.

sazzer avatar sazzer commented on May 19, 2024

Postgres has first class JSON support, but technically you can store JSON in text blobs in mysql as well - Indeed we actually do exactly that at my work.

from sqlx.

abonander avatar abonander commented on May 19, 2024

We could serialize JSON to text for MySQL but the query!() macro couldn't possibly know to read out a varchar field as JSON.

We could make it work with query_as!() but it'd be difficult to discover serendipitously; we'd need an example showing it.

from sqlx.

dervus avatar dervus commented on May 19, 2024

I'm not an expert in MySQL, but why this isn't suiting? https://dev.mysql.com/doc/refman/8.0/en/json.html

from sqlx.

sazzer avatar sazzer commented on May 19, 2024

It depends on the MySQL version. We're still using 5.6. because of some other tooling requirements, so it's not available there. If you're on a new enough version then that would make it a lot easier though :)

from sqlx.

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.