The Nim [Row][nim-row] implementation only supports positional identification of columns. In other words, there is nothing to tell us which column is in which position. Because of this, we always create SQL statements which explicitly name the columns we wish to receive so that we know the order of columns and can rebuild models appropriately. `createRule` wasn't doing this but naively using `RETURNING *`. This still works as long as the field ordering in the Nim model class match the default column ordering returned by the database, but confuses columns otherwise. This fixes that by specifying explicitly the column ordering as we do in other places. [nim-row]: https://nim-lang.org/docs/db_postgres.html#Row
15 lines
284 B
Nim
15 lines
284 B
Nim
# Package
|
|
|
|
version = "1.0.1"
|
|
author = "Jonathan Bernard"
|
|
description = "Lightweight Postgres ORM for Nim."
|
|
license = "GPL-3.0"
|
|
srcDir = "src"
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
requires "nim >= 1.4.0"
|
|
requires "https://git.jdb-software.com/jdb/nim-namespaced-logging.git"
|