linkml_store.api.stores.filesystem.filesystem_database module
- class FileSystemDatabase(handle=None, **kwargs)[source]
Bases:
Database
- collection_class
alias of
FileSystemCollection
-
default_file_format:
Optional
[str
] = None
-
no_backup_on_drop:
bool
= False
-
directory_path:
Optional
[Path
] = None
- property metadata_path: Path
- drop(no_backup=False, **kwargs)[source]
Drop the database and all collections.
>>> from linkml_store.api.client import Client >>> client = Client() >>> path = Path("/tmp/test.db") >>> path.parent.mkdir(exist_ok=True, parents=True) >>> db = client.attach_database(f"duckdb:///{path}") >>> db.store({"persons": [{"id": "P1", "name": "John", "age_in_years": 30}]}) >>> coll = db.get_collection("persons") >>> coll.find({}).num_rows 1 >>> db.drop() >>> db = client.attach_database("duckdb:///tmp/test.db", alias="test") >>> coll = db.get_collection("persons") >>> coll.find({}).num_rows 0
- Parameters:
kwargs – additional arguments