UNPKG

mongo2crate

Version:

Sync MongoDB to CrateDB and Convert JSON schema to SQL DDL

14 lines (13 loc) 670 B
import makeError from 'make-error'; import { type JSONSchema } from 'mongochangestream'; import type { ConvertOptions } from './types.js'; export declare const Mongo2CrateError: makeError.Constructor<makeError.BaseError>; export type ConvertSchema = (jsonSchema: JSONSchema, qualifiedName: string, options?: ConvertOptions) => string; /** * Convert MongoDB JSON schema to CrateDB table DDL. * * There are options that allow you to preprocess nodes, omit fields, rename * fields, and change the BSON type for fields (e.g. when a more specific * numeric type is needed). @see {@link ConvertOptions} for details. */ export declare const convertSchema: ConvertSchema;