dirigible
dirigible copied to clipboard
DB Update API doesn't work correctly when using floating-point types
Example usage of the update API:
import { update } from "sdk/db";
const UPDATE_BY_CODE = "UPDATE `oc_order_total` SET `value` = ? WHERE (`order_id` = ? AND `code`=?)";
const orderId = 1;
const value = 13.13;
const code = 'total';
const params = [value, orderId, code];
update.execute(UPDATE_BY_CODE, params, 'ElectronicsStoreOpenCartDB');
Results in incorrect value 13, must be 13.13:
Most probably due to the following code
parameterElement.getAsInt()
in here
PR: https://github.com/eclipse/dirigible/pull/3929