type BaseQuery = ReturnType<typeof getBaseQuery>;type Key = Parameters<BaseQuery["orderBy"]>["0"];type WhiteList = Key[];const WHITELIST_ORDER_BY_KEYS: WhiteList = [ "name", "price_btc", "sold", "marketplace",];
orderBy
type BaseQuery = ReturnType<typeof getBaseQuery>;//My approach👇type Key = Parameters<BaseQuery["orderBy"]>["0"];type AddOrderBy = { query: BaseQuery; key?: Key; dir?: "asc" | "desc";};
::text[]
null
node-postgres
malformed array literal: "[]"
....selectAll("Collection").select((eb) => [ sql<string[]>`categories::text[]`.as("categories"),...
min
fn("round", [fn("min", ["ld.price_btc"]), sql.lit(5)]).as( "floor_price" ),