Zig relational mapper
ZRM is part of zedd, a collection of useful libraries for zig.
ZRM provides a simple interface to relational databases in Zig. Define your repositories and easily write queries to retrieve and save complex Zig structures.
ZRM 0.3.0 is made and tested with zig 0.13.0.
ZRM aims to handle a lot for you, but it takes time to make. Have a look to the issues to see what is currently planned or being worked on.
In your project directory:
$ zig fetch --save https://code.zeptotech.net/zedd/zrm/archive/v0.3.0.tar.gz
In build.zig
:
// Add zrm dependency.
const zrm = b.dependency("zrm", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zrm", zrm.module("zrm"));
A full documentation can be found on zedd.zeptotech.net/zrm.
Some examples can be found in tests
directory: