-
-
Notifications
You must be signed in to change notification settings - Fork 2
savepoint.schema()
Oxford Harrison edited this page Nov 15, 2024
·
3 revisions
DOCS • API • Savepoint API
Get the Savepoint's database schema snapshot.
savepoint.schema(): DatabaseSchema;
Interface | Description |
---|---|
DatabaseSchema |
The schema snapshot of the database. |
Given the following operation:
const databaseSchema = {
name: 'database_1',
tables: [{
name: 'table_1',
columns: []
}]
};
const savepoint = await client.createDatabase(databaseSchema, { desc: 'Create description', returning: 'savepoint' });
Get the database schema snapshot:
console.log(savepoint.schema()); // An object corresponding to databaseSchema
const savepoint = await client.database('database_1').savepoint();
await savepoint.schema(); // An object corresponding to databaseSchema