Page MenuHomeSealhub

human-comparator-to-query.ts
No OneTemporary

human-comparator-to-query.ts

export type HumanComparator =
| ">"
| "from"
| "gt"
| "gte"
| ">="
| "=>"
| "<"
| "to"
| "lt"
| "lte"
| "<="
| "=<"
| "=";
export type DBComparator = "$gt" | "$gte" | "$lt" | "$lte" | "$eq";
const human_comparators_to_query: {
[comparator in HumanComparator]: DBComparator;
} = {
">": "$gt",
from: "$gte",
gt: "$gt",
gte: "$gte",
">=": "$gte",
"=>": "$gte",
"<": "$lt",
to: "$lte",
lt: "$lt",
lte: "$lte",
"<=": "$lte",
"=<": "$lte",
"=": "$eq",
};
export default function humanComparatorToQuery(
comparator: HumanComparator
): DBComparator {
return human_comparators_to_query[comparator];
}
export type ComparatorObject<T> = { [key in HumanComparator]: T };

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 04:10 (12 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
553228
Default Alt Text
human-comparator-to-query.ts (692 B)

Event Timeline