A little late in Ormin's development (ahem...) we finally have documentation: https://github.com/Araq/ormin
Many thanks to @Elcritch!
Cool! Now I can finally embrace Ormin's greatness, it has escaped me so far 😅
Ormin is really good. I think if the docs were present back in the day, I wouldn't have started working on Norm at all.
You know Ormin is lacking a few pieces that'd make it really great like transactions.
IMHO it's be awesome to work with Norman too. Maybe @araq wouldn't like it but I think having Norm's ability to make Nim objects and create SQL tables from that would be fantastic when combined with Ormin's SQL query. Especially if it could support different primary keys.
Ormin now supports defining custom sql functions! See the README section on custom sql functions.
proc substr(s: string; start, length: int): string {.importSql.}
let name = "foo"
let rows = query:
select tb_string(substr(typstring, 1, 5))
where substr(typstring, 1, 5) == ?name
This is much nicer to use than the !!"raw sql" primitive and supports basic type checking.