@datastax/astra-mongoose
Version:
Astra's NodeJS Mongoose compatibility client
7 lines (6 loc) • 300 B
TypeScript
import { CreateTableDefinition } from '@datastax/astra-db-ts';
import { Schema } from 'mongoose';
/**
* Given a Mongoose schema, create an equivalent Data API table definition for use with `createTable()`
*/
export default function tableDefinitionFromSchema(schema: Schema): CreateTableDefinition;