numeric returns string when querying with Postgres
inspecting
order.totalValue I get typebut when I do a query such as
The result is inferred as
string | null for this column rather than number | nullexport const order = pgTable(
'orders', {
...
totalValue: numeric('total_value', { precision: 10, scale: 2 }),
...
})order.totalValuePgNumeric<{
tableName: "orders";
name: "total_value";
data: string;
driverParam: string;
notNull: false;
hasDefault: false;
}>await db
.insert(order)
.values({
...input,
})
.returning();number | null