Zig relational mapper.
Find a file
Madeorsk e33bc5aaa2
Create generic query result mapper and implement it for PostgreSQL.
+ Add generic query result mapper.
+ Add query result mapper implementation for PostgreSQL.
2024-11-23 18:18:41 +01:00
src Create generic query result mapper and implement it for PostgreSQL. 2024-11-23 18:18:41 +01:00
tests Set relations to retrieve by a query at compile time. 2024-11-22 22:36:51 +01:00
.gitignore Create ZRM, repositories and its related queries. 2024-10-16 12:01:16 +02:00
build.zig Create ZRM, repositories and its related queries. 2024-10-16 12:01:16 +02:00
build.zig.zon Relations definition and SQL query build improvements. 2024-11-22 15:41:05 +01:00
LICENSE Create ZRM, repositories and its related queries. 2024-10-16 12:01:16 +02:00
logo.svg Create ZRM, repositories and its related queries. 2024-10-16 12:01:16 +02:00
README.md Version 0.2.0 2024-10-22 16:30:11 +02:00

ZRM logo

ZRM

Documentation | API

Zig relational mapper

ZRM is part of zedd, a collection of useful libraries for zig.

ZRM

ZRM provides a simple interface to relational databases in Zig. Define your repositories and easily write queries to retrieve and save complex Zig structures.

Versions

ZRM 0.2.0 is made and tested with zig 0.13.0.

Work in progress

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.

How to use

Install

In your project directory:

$ zig fetch --save https://code.zeptotech.net/zedd/zrm/archive/v0.2.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"));

Examples

Full examples can be found in tests directory: