Commit graph

47 commits

Author SHA1 Message Date
edcc75f003
Add visual diagrams for relationships.
Visual diagrams could help readers to understand associations between models more easily.

Closes #10
2024-11-27 19:49:56 +01:00
a2f6152337
Add links to official documentation in README. 2024-11-27 17:56:09 +01:00
8a36bbcd8c
Fix zeptotech logo path in footer. 2024-11-27 17:52:23 +01:00
1b2c3ee37f
Fix site base for production. 2024-11-27 17:50:45 +01:00
bc7b4ebc69
Move static assets to public directory. 2024-11-27 17:47:02 +01:00
97395c33ad
Fix docs configuration for website production build. 2024-11-27 17:44:25 +01:00
b3aa02ea0d
Fix bad link to database setup documentation. 2024-11-27 17:37:42 +01:00
bc654b35ec
Setup and write documentation website, logo update. 2024-11-27 17:34:00 +01:00
b897ce70ab
Rename relations to relationships.
Closes #11
2024-11-27 15:26:20 +01:00
66cf93d6f7
Update pg.zig to latest 0.13 version. 2024-11-26 16:01:43 +01:00
9567e57278
Allow pointers as one relations values.
* Allow to define pointers to receive one relations values: this solves self-referencing issues (e.g. UserInfo.user in example model).
2024-11-26 14:04:27 +01:00
3501c48eaf
Add a new full example model with all relations types.
+ Add a new example model.
+ Test all relations types on example model.
2024-11-26 12:56:40 +01:00
854c66e78b
Allow tests to be run in any order. 2024-11-26 12:55:07 +01:00
141c5e674c
Guess reverse one relation foreign key. 2024-11-26 12:54:12 +01:00
27fe66ef03
Add quotes to columns names in one relations and add missing space when one relation is through a table. 2024-11-26 12:14:48 +01:00
66a494cc0b
Fix keys in many relation query through a pivot table. 2024-11-26 10:46:03 +01:00
cbca46020e
Fix query syntax for many relation through a pivot table. 2024-11-26 10:28:17 +01:00
5382371954
Fix memory leaks when an error is returned while reading results. 2024-11-26 10:24:50 +01:00
56d9414dfa
Detect NULL relations. 2024-11-26 00:33:45 +01:00
916def2046
Add table name to key name in whereKey to prevent ambiguous names with inline relations. 2024-11-25 23:29:01 +01:00
8bc551b55b
Fix double release of the same connection when executing a query. 2024-11-25 23:23:53 +01:00
fc6cbaa2b9
Fix TableWithRelations for TableShape with declarations. 2024-11-25 23:12:21 +01:00
4782cbb37a
Base TableModel helpers on TableShape instead of Model. 2024-11-25 23:12:02 +01:00
21a2e88295
SQL string runtime allocation is no more needed since the prefix is now always comptime-known. 2024-11-25 18:46:45 +01:00
97c4c429e1
Easier access to relations types and comptime values and improved definition process. 2024-11-25 18:41:29 +01:00
ce5aeffd2c
Improve relations QueryType definition and access. 2024-11-25 15:32:52 +01:00
b3007a1b5d
Load relations which are not inline.
+ Allow to retrieve metadata along with models.
+ Get all unloaded relations after model mapping.
+ Test hasMany relations.
+ Separate runtime and comptime relations instances. TODO: improve this.
* Fix and improve relations query building.
* Fix comptime select build called in runtime functions.
2024-11-25 13:02:59 +01:00
24989603a3
Handle inline relations in result parsing.
+ Parse inline relations when parsing a query result.
+ Implement a custom pg.Mapper to pass the row manually.
2024-11-24 01:53:00 +01:00
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
04b61f9787
Set relations to retrieve by a query at compile time.
+ Add compile-time utility functions to build strings and queries.
* Relations to retrieve when querying a model must now be set at comptime.
2024-11-22 22:36:51 +01:00
5a2964622c
Relations definition and SQL query build improvements.
+ Relations definition.
+ Add test submodels in testing database.
* Generalize raw SQL query preparation and build.
* Simplify and improve SQL query build algorithms.
2024-11-22 15:41:05 +01:00
f39fc2cadd
Generalize query results mapping. 2024-10-22 21:42:00 +02:00
f186b99fde
Version 0.2.0 2024-10-22 16:30:11 +02:00
cc4c808937
Add sessions (as a specific database connector) and transactions.
Closes #2
2024-10-22 16:28:06 +02:00
fee00d5bc9
Allow tests to be run in any order. 2024-10-22 15:44:41 +02:00
7e31368fa3
Introduce generic connectors and connections and use them in the queries. 2024-10-22 14:09:02 +02:00
0132ec282b
Fix find with one key when model key is a string. 2024-10-17 23:00:35 +02:00
2f93383aa5
Version 0.1.2 2024-10-17 19:08:46 +02:00
650d2515be
Add generic helper functions for models which have the same table definition. 2024-10-17 19:08:39 +02:00
e2bce7e7a1
Apply insertable automatically to insertShape of repository configuration. 2024-10-17 19:08:23 +02:00
9d0cc13b65
Add InsertableStruct to define insertShapes more easily. 2024-10-17 18:34:49 +02:00
26c854a39c
Fix ModelKeyType structure fields alignment. 2024-10-17 18:34:10 +02:00
28bef7ef42
Version 0.1.1 2024-10-17 13:08:24 +02:00
5b9cfd08c4
Deinitialize the query result and release the connection as soon as possible. 2024-10-17 13:04:15 +02:00
a13949ca4d
Add a WIP mention to README. 2024-10-16 14:30:08 +02:00
7734cea9d0
Allow arrays as model key in repository find function. 2024-10-16 14:07:40 +02:00
0eecb4df99
Create ZRM, repositories and its related queries. 2024-10-16 12:01:16 +02:00