Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zigzedd/zrm
[MIRROR] Zig relational mapper.
https://github.com/zigzedd/zrm
database mapper orm zig
Last synced: 10 days ago
JSON representation
[MIRROR] Zig relational mapper.
- Host: GitHub
- URL: https://github.com/zigzedd/zrm
- Owner: zigzedd
- License: mit
- Created: 2024-10-16T12:32:16.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T21:01:15.000Z (4 months ago)
- Last Synced: 2024-10-19T14:57:07.797Z (4 months ago)
- Topics: database, mapper, orm, zig
- Language: Zig
- Homepage: https://code.zeptotech.net/zedd/zrm
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ZRM
Documentation
|
API
Zig relational mapperZRM is part of [_zedd_](https://code.zeptotech.net/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.3.1 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](https://code.zeptotech.net/zedd/zrm/issues) to see what is currently planned or being worked on.
## How to use
### Install
In your project directory:
```shell
$ zig fetch --save https://code.zeptotech.net/zedd/zrm/archive/v0.3.1.tar.gz
```In `build.zig`:
```zig
// Add zrm dependency.
const zrm = b.dependency("zrm", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zrm", zrm.module("zrm"));
```### Documentation
A full documentation can be found on [zedd.zeptotech.net/zrm](https://zedd.zeptotech.net/zrm).
### Examples
Some examples can be found in `tests` directory:
- [`tests/example.zig`](https://code.zeptotech.net/zedd/zrm/src/branch/main/tests/example.zig)
- [`tests/repository.zig`](https://code.zeptotech.net/zedd/zrm/src/branch/main/tests/repository.zig)
- [`tests/composite.zig`](https://code.zeptotech.net/zedd/zrm/src/branch/main/tests/composite.zig)