src/norm/private/postgres/rowutils

Procs to convert Model instances or ref object instances to ndb.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 ndb.postgres.Row instance.

Nested ref object fields are populated from the same ndb.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 ndb.postgres.Row instance.

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