adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.97k stars 97 forks source link

Get count without parameter #525

Closed proyb6 closed 1 year ago

proyb6 commented 1 year ago

Describe the bug Missing property from string

It returned [object Object] instead of string which I have to use object1[0].count, is there a way to return only string?

Expected behavior Should work without any parameter. Look like a bug from generated code.

Test case SELECT COUNT(*)::int FROM posts WHERE active > 0

adelsz commented 1 year ago

Rows are returned as objects, you can customize this behavior by building a custom query executor.