-
Notifications
You must be signed in to change notification settings - Fork 0
/
xata.ts
41 lines (31 loc) · 1.02 KB
/
xata.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Generated by Xata Codegen 0.22.3. Please do not edit.
import { buildClient, buildWorkerRunner } from "@xata.io/client";
import type {
BaseClientOptions,
SchemaInference,
XataRecord,
} from "@xata.io/client";
const tables = [] as const;
export type SchemaTables = typeof tables;
export type InferredTypes = SchemaInference<SchemaTables>;
export type DatabaseSchema = {};
const DatabaseClient = buildClient();
const defaultOptions = {
databaseURL:
"https://Jason-K-Frank-s-workspace-ul7brh.us-east-1.xata.sh/db/xata-worker-game",
};
export class XataClient extends DatabaseClient<DatabaseSchema> {
constructor(options?: BaseClientOptions) {
super({ ...defaultOptions, ...options }, tables);
}
}
let instance: XataClient | undefined = undefined;
export const getXataClient = () => {
if (instance) return instance;
instance = new XataClient();
return instance;
};
export const xataWorker = buildWorkerRunner<XataClient>({
workspace: "Jason-K-Frank-s-workspace-ul7brh",
worker: "cg54q7btbhkmciakk20g",
});