Araq / ormin

Ormin -- An ORM for Nim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

produce json got <typeof(nil)>

huaxk opened this issue · comments

commented

When i test produce json in select statement:

  test "produce json":
    let users = query:
      select users(id, name, password)
      produce json
    echo users

I got an exception:

/mnt/c/sources/ormin/tests/tpostgres.nim(62, 7) template/generic instantiation of `bindResultJson` from here
/mnt/c/sources/ormin/ormin/ormin_postgre.nim(121, 28) Error: type mismatch: got <typeof(nil)>
but expected one of: 
proc newJString(s: string): JsonNode
  first type mismatch at position: 1
  required type for s: string
  but expression 'nil' is of type: typeof(nil)

expression: newJString(nil)