Our great sponsors
-
sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)
-
chalk
An implementation and definition of the Rust trait system using a PROLOG-like logic solver (by rust-lang)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
SQLx's query macros act like format macros, and the database is apparently smart enough to not treat bind parameters as part of the SQL.
Well it's quite easy to come to that conclusion: The code compiles with rustc, which is currently the reference implementation. If rust-analyzer does not match rustc's behavior it's an issue in their implementation. That written it's not that easy to fix as it's related to how rust-analyzer resolves types/traits. rust-analyzer uses chalk for this, which is known to be incomplete/diverging from the RFC'ed behavior. Now one could argue that we can simplify diesel to the point where it works will with rust-analyzer/chalk, but that would result in basically removing core diesel features that exist way longer than rust-analyzer.
Related posts
- SQLX MSSQL Connection String Problem
- SQLx 0.7 released! Offline mode usability improvements, performance fixes and major upgrades across the board!
- MariaDB / SQLx - "Unknown Authentication Plugin"
- What do you think about macros that use remote source to calculate its result?
- Ask HN: Why is there no database with a functional query language?