Fancy Syntax

To avoid creating intermediate containers here and there, use Nim's dup macro to create mutable objects on the fly:

import
  sugar

For example, here's how you insert ten rows without having to create ten stale objects:

for i in 1 .. 10:
  discard newUser($i & "@example.com").dup:
    dbConn.insert

dup lets you call multiple procs, which gives a pleasant interface for row filter and bulk manipulation:

discard @[newUser()].dup:
  dbConn.select("email LIKE ?", "_@example.com")
  dbConn.delete