Correctly pluralize tables names in getAll
and findWhere
generated procedures.
This commit is contained in:
parent
4e0a173c76
commit
004e3c19bb
@ -1,6 +1,6 @@
|
|||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
author = "Jonathan Bernard"
|
author = "Jonathan Bernard"
|
||||||
description = "Lightweight Postgres ORM for Nim."
|
description = "Lightweight Postgres ORM for Nim."
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
@ -10,5 +10,5 @@ srcDir = "src"
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 1.4.0"
|
requires @["nim >= 1.4.0", "uuids"]
|
||||||
requires "https://git.jdb-software.com/jdb/nim-namespaced-logging.git"
|
requires "https://git.jdb-software.com/jdb/nim-namespaced-logging.git"
|
||||||
|
@ -432,8 +432,8 @@ macro generateProcsForModels*(dbType: type, modelTypes: openarray[type]): untype
|
|||||||
for t in modelTypes:
|
for t in modelTypes:
|
||||||
let modelName = $(t.getType[1])
|
let modelName = $(t.getType[1])
|
||||||
let getName = ident("get" & modelName)
|
let getName = ident("get" & modelName)
|
||||||
let getAllName = ident("getAll" & modelName & "s")
|
let getAllName = ident("getAll" & pluralize(modelName))
|
||||||
let findWhereName = ident("find" & modelName & "sWhere")
|
let findWhereName = ident("find" & pluralize(modelName) & "Where")
|
||||||
let createName = ident("create" & modelName)
|
let createName = ident("create" & modelName)
|
||||||
let updateName = ident("update" & modelName)
|
let updateName = ident("update" & modelName)
|
||||||
let deleteName = ident("delete" & modelName)
|
let deleteName = ident("delete" & modelName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user