I am using sinclair/typebox
for TypeScript project, here is my schema:
export const ItemValue = Type.Object({
itemBalance: Type.Number()
})
export type ItemValueType = Static<typeof ItemValue>;
how I am reading this data from oracle db:
const result = await connection.execut<ItemValueType>(query, {
{
outFormat: OUT_FORMAT_OBJECT
}
})
The issue is that there is a value in oracle 15.79
which is being returned as 15.790000000000001
any ideas how to fix this issue?
I ended up using
TO_CHAR
function in my query like so:This resolved my issue.