First Commit. Duplicate bunext-sqlite preset

This commit is contained in:
2026-10-18 16:47:11 +01:00
commit 81e4a8aecc
718 changed files with 41695 additions and 0 deletions
@@ -0,0 +1,20 @@
import type { ApiReqParams } from "../types";
import type { BUN_SQLITE_BSQLITE_USERS_JOIN } from "../types/sql-joins";
export default function searchableFieldToQueryField({
field,
}: {
field: keyof BUN_SQLITE_BSQLITE_USERS_JOIN;
}): keyof ApiReqParams {
switch (field) {
case "email":
return "search_term_email";
case "last_name":
return "search_term_last_name";
case "user_types":
return "search_term_user_type";
case "first_name":
default:
return "search_term_first_name";
}
}