Add tryGet<RecordName> versions of get<Record> calls

`tryGet<RecordName>`  returns Option types rather than raise exceptions.

For example:

    generateProcsForModels(MyDb, [ User ])

will now create both:

    proc getUser*(db: MyDb, id: string): User
    proc tryGetUser*(db: MyDb, id: string): Option[User]
This commit is contained in:
2025-09-02 00:35:54 -05:00
parent e1fa2480d0
commit f54bf6e974
2 changed files with 18 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# Package
version = "4.0.0"
version = "4.1.0"
author = "Jonathan Bernard"
description = "Lightweight Postgres ORM for Nim."
license = "GPL-3.0"