norm/private/postgres/rowutils

    Dark Mode
Search:
Group by:

Procs to convert Model instances to ndb.postgres.Row instances and back.

Procs

proc fromRow[T: Model](obj: var T; row: Row)

Populate Model instance from ndb.postgres.Row instance.

Nested Model fields are populated from the same ndb.postgres.Row instance.

proc toRow[T: Model](obj: T; force = false): Row

Convert Model instance into ndb.postgres.Row instance.

If force is true, fields with ro pragma are not skipped.