Comments (5)
JSON for Postgres is in master. Thanks @oeb25! I'll spin out another issue for MySQL.
from sqlx.
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.
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.
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.
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)
- BUG. SQLX error[E0658] When building the project HOT 6
- Reorder sqlx::test attributes
- Support for const formatted strs in query macros HOT 1
- sqlx(default) does not work HOT 1
- Add version infromation in `sqlx migrate run` output for failed migration
- Unable to bind sql statement HOT 1
- Pool creates many connections when under high contention HOT 1
- Macros: add option to surface warning notices as errors HOT 2
- `FirebirdSQL` support
- SqliteConnectOptions::new() doesn't set in_memory = true HOT 1
- PostgreSQL: Rolling back a failed transaction with COPY results in `expecting ParseComplete but received CommandComplete`
- Support "ALL" as LIMIT argument HOT 2
- Support identifiers in SQL query templates
- Cannot get value from Columm type float , double or decimal in mysql 5.8 aka 8.2 HOT 1
- Enabling loading of static compiled extensions HOT 1
- 0.7.3: compile, undefined symbol: sqlite3_unlock_notify HOT 2
- Implementation of `Executor` is not general enough HOT 1
- Document how to use `Json<T>` with the query macros HOT 2
- any_kind() not available
- SQLx is not taking into account the SET LOCAL ROLE query when verifying the subsequent queries. HOT 4
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 sqlx.