Database

Jetzig's database layer is provided by JetQuery.

Jetzig provides some shortcuts for accessing JetQuery's functionality but it can also be used standalone in any application. See the Standalone Usage section for more information.

All SQL queries are generated at compile time using Zig's comptime functionality. Queries can then be passed to a JetQuery repository to be executed with a database adapter.

Currently only PostgreSQL support is provided, but more adapters are planned to be released soon (including SQLite).

The PostgreSQL adapter is built on top of Karl Seguin's pg.zig.

Many aspects JetQuery's functionality are inspired by Ecto and ActiveRecord. If you are already familiar with similar frameworks then you should find picking up JetQuery's semantics quite straightforward.