src/norm/private/postgres/rowutils

Procs to convert Model instances or ref object instances to lowdb.postgres.Row instances and back.This does the actual heavy lifting for parsing

Procs

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

Populate ref object instance from lowdb.postgres.Row instance.

Nested ref object fields are populated from the same lowdb.postgres.Row instance.

func isEmptyColumn(row: Row; index: int): bool {....raises: [], tags: [].}
Checks whether the column at a given index is empty
proc toRow[T: Model](obj: T; force = false): Row

Convert Model instance into lowdb.postgres.Row instance.

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