You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, that's not really so. Passing numbers silently converts them to strings, and breaks queries expecting proper numbers. For example:
console.log((awaitdb.$query`select substring('foobar', ${4}) as bar`).rows[0])// Result: { bar: null }// Expected: { bar: 'bar' }
I'm not sure if that's a bug in Orchid or it's how the upstream Postgres bindings behave. If it's the latter, I believe that should better be clearly mentioned in the documentation.
orchid-orm 1.49.0
pg 8.13.1
The text was updated successfully, but these errors were encountered:
The documentation makes it think that one can pass numbers to SQL query:
However, that's not really so. Passing numbers silently converts them to strings, and breaks queries expecting proper numbers. For example:
I'm not sure if that's a bug in Orchid or it's how the upstream Postgres bindings behave. If it's the latter, I believe that should better be clearly mentioned in the documentation.
The text was updated successfully, but these errors were encountered: