High performance and compile-time definitions of models, APIs and authorizations.
Find a file
2024-12-08 18:32:35 +01:00
lib Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00
src Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00
tests Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00
.gitignore Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00
build.zig Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00
build.zig.zon Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00
README.md Initial project setup with a declarative API for models definition and their dispatchers. 2024-12-08 18:32:35 +01:00

PGMQL

PGMQL (or PostgreMQL or Pro Gamer Master Query Language) is a library designed to ease the creation of models APIs for backend and frontend uses.

PGMQL features model definition with relationships, CRUD operations, custom dispatchers definition, authentication and authorization. All these features are based on a PostgreSQL database, which means that you're never stuck with PGMQL: you can interact with your data in other ways if you feel limited with PGMQL (its goal is not to replace everything).

PGMQL uses Zig to provide very high performances and compile-time definitions of models, APIs and authorizations.

Features

Model definition

With PGMQL, you can define your models in a structure-oriented way. A model is a structure which can be related to other structures, through relationships. You can then ask PGMQL to retrieve the models with the required relationships.

CRUD operations

PGMQL natively provide a full-featured REST API to perform CRUD operations on your models. For each defined model, you can easily create them with POST requests, read them with GET requests, update them with PATCH requests and delete them with DELETE requests.

Custom dispatchers

In real-world applications, models often need to allow more operations than simple CRUD: with PGMQL, you can define custom dispatchers to perform multiple complex operations in a single transaction.

Authentication

Your models can be protected to be accessible / editable by authenticated users only. Authenticated accounts can also bear some useful metadata for CRUD operations or dispatchers.

Authorization

PGMQL allows you to define policies for every model: you can easily define access control for CRUD operations, but also custom dispatchers.