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
Tue, Dec 24, 05:56 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
553228
Default Alt Text
human-comparator-to-query.ts (692 B)

Event Timeline