Fix bigint/number type in orm WHERE

This commit is contained in:
Cadence Ember 2024-08-28 01:47:47 +12:00
commit 607fd3808a
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ const U = require("./orm-defs")
* @template {keyof U.Models[Table]} Col
* @param {Table} table
* @param {Col[] | Col} cols
* @param {Partial<U.Models[Table]>} where
* @param {Partial<U.Numberish<U.Models[Table]>>} where
* @param {string} [e]
*/
function select(table, cols, where = {}, e = "") {
@ -108,7 +108,7 @@ class From {
}
/**
* @param {Partial<U.Models[Table]>} conditions
* @param {Partial<U.Numberish<U.Models[Table]>>} conditions
*/
where(conditions) {
const wheres = Object.entries(conditions).map(([col, value]) => {