cap-js / cds-dbs

Monorepo for SQL Database Services for CAP
https://cap.cloud.sap/docs/
Apache License 2.0
32 stars 9 forks source link

fix: allow hdb to have default type placeholders #671

Open BobdenOs opened 1 month ago

BobdenOs commented 1 month ago

When a resulting SQL statement has place holders of unknown type it causes trouble with hdb. As it enforces the data type that HANA provides. So in certain cases a place holder will default to nvarchar, but the actual value for the place holder will be a number. Which will be rejected as hdb only allows strings to be provided to these placeholders. There for this change converts all the values into a string before sending them to the prepared statement.