kota's memex

A rust sql library supporting postgres sqlite mariadb and mysql.

Sqlx is not an ORM and does not introduce some new DSL and yet it supports the best features of all: compile-time checked queries.

This insane black magic is achieved with query macros which talk to your actual database at compile time. This has the obvious downside of you needing to have your database running to compile, BUT you can cache the results of this check (for use in CI).

There are negatives to doing this, you'll want to create a git hook to avoid forgetting to update this cache, but in my opinion these annoyances are far outweighed by having what is normally difficult to debug runtime bugs arise at compile-time.