pofider / node-odata-to-sql

Generate SQL from OData in node.js
MIT License
5 stars 4 forks source link

Oracle boolean <> number conversion #5

Closed jorisdebock closed 3 years ago

jorisdebock commented 3 years ago

Boolean to number and back conversion is not correct for Oracle

e.g.

UPDATE "jsreport_UserType" SET "username" = :1, "readAllPermissions" = :2, "_id" = :3, "creationDate" = :4, "modificationDate" = :5, "shortid" = :6 WHERE ("jsreport_UserType"."_id" 
= :7)
[
  'test',
  true,
  '989137eb-8096-4376-bf66-5ff73274127b',
  2021-04-12T17:51:19.801Z,
  2021-04-12T18:06:26.841Z,
  '1iHhD6C',
  '989137eb-8096-4376-bf66-5ff73274127b'
]

"true" should be "1" in the query itself, since the type is defined as number(1)

@pofider I am not sure where this should be fixed, in this library or in jsreport-sql-2?

jorisdebock commented 3 years ago

currently fixed oracle-store-extension itself: https://github.com/jsreport/jsreport-oracle-store/pull/1