@tinybirdco/mockingbird
Version:
75 lines • 2.27 kB
TypeScript
import { Database, Instance, Spanner, Table } from "@google-cloud/spanner";
import { z } from "zod";
import { Row } from "../types";
import { BaseGenerator } from "./BaseGenerator";
declare const GoogleSpannerConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
schema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
type: z.ZodString;
params: z.ZodOptional<z.ZodAny>;
count: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: string;
count?: number | undefined;
params?: any;
}, {
type: string;
count?: number | undefined;
params?: any;
}>>, Record<string, {
type: string;
count?: number | undefined;
params?: any;
}>, Record<string, {
type: string;
count?: number | undefined;
params?: any;
}>>;
eps: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
logs: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
}, {
projectId: z.ZodString;
instanceId: z.ZodString;
databaseId: z.ZodString;
table: z.ZodString;
keyFilename: z.ZodString;
}>, "strip", z.ZodTypeAny, {
schema: Record<string, {
type: string;
count?: number | undefined;
params?: any;
}>;
eps: number;
limit: number;
projectId: string;
instanceId: string;
databaseId: string;
table: string;
keyFilename: string;
logs?: boolean | undefined;
}, {
schema: Record<string, {
type: string;
count?: number | undefined;
params?: any;
}>;
projectId: string;
instanceId: string;
databaseId: string;
table: string;
keyFilename: string;
eps?: number | undefined;
limit?: number | undefined;
logs?: boolean | undefined;
}>;
export type GoogleSpannerConfig = z.infer<typeof GoogleSpannerConfigSchema>;
export declare class GoogleSpannerGenerator extends BaseGenerator<GoogleSpannerConfig> {
readonly client: Spanner;
readonly instance: Instance;
readonly database: Database;
readonly table: Table;
constructor(config: GoogleSpannerConfig);
sendData(rows: Row[]): Promise<void>;
}
export {};
//# sourceMappingURL=GoogleSpannerGenerator.d.ts.map