mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-28 22:46:14 +00:00
feat: add a cascade option to drop_database (#4697)
The remote catalog could only drop an empty database: it always asked
the server for a restricted drop.
`DropDatabaseRequest::cascade`, `drop_database(..., cascade=True)` in
Python and `dropDatabase(name, { cascade: true })` in TypeScript ask the
server to drop everything in the database first. The name stays taken
until the server finishes cleaning up the dropped objects' storage. A
restricted drop remains the default.
This commit is contained in:
@@ -70,7 +70,9 @@ Create a database, or open an existing database when existOk is true.
|
||||
dropDatabase(name, options): Promise<void>
|
||||
```
|
||||
|
||||
Drop an empty database. The server rejects nonempty databases.
|
||||
Drop a database. A nonempty database is an error unless `cascade` is set,
|
||||
which drops everything in it first; the name stays taken until the server
|
||||
finishes cleaning up their storage.
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -78,6 +80,8 @@ Drop an empty database. The server rejects nonempty databases.
|
||||
|
||||
* **options** = `{}`
|
||||
|
||||
* **options.cascade?**: `boolean`
|
||||
|
||||
* **options.ignoreMissing?**: `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
Reference in New Issue
Block a user