@datastax/astra-mongoose
Version:
Astra's NodeJS Mongoose compatibility client
8 lines (7 loc) • 371 B
TypeScript
import { CreateTypeDefinition } from '@datastax/astra-db-ts';
import { Schema } from 'mongoose';
/**
* Given a Mongoose schema, get the definitions of all the UDTs used by this schema.
* Used to create all UDTs required by the schema before creating the table.
*/
export default function udtDefinitionsFromSchema(schema: Schema): Record<string, CreateTypeDefinition>;