Flesh out documentation with a worked example.

This commit is contained in:
2022-09-03 20:53:37 -05:00
parent 9bf3c4f3ec
commit a3dbb0bbbc
2 changed files with 191 additions and 14 deletions

View File

@ -325,6 +325,7 @@ proc typeOfColumn*(modelType: NimNode, colName: string): NimNode =
proc isEmpty(val: int): bool = return val == 0
proc isEmpty(val: UUID): bool = return val.isZero
proc isEmpty(val: string): bool = return val.isEmptyOrWhitespace
proc isEmpty[T](val: Option[T]): bool = return val.isNone
macro populateMutateClauses*(t: typed, newRecord: bool, mc: var MutateClauses): untyped =
## Given a record type, create the datastructure used to generate SQL clauses