Open a GraphLite database at the given path Args: path: Path to the database directory Returns: GraphLite instance Raises: ConnectionError: If database cannot be opened
(cls, path: str)
| 36 | |
| 37 | @classmethod |
| 38 | def open(cls, path: str): |
| 39 | """ |
| 40 | Open a GraphLite database at the given path |
| 41 | |
| 42 | Args: |
| 43 | path: Path to the database directory |
| 44 | |
| 45 | Returns: |
| 46 | GraphLite instance |
| 47 | |
| 48 | Raises: |
| 49 | ConnectionError: If database cannot be opened |
| 50 | """ |
| 51 | try: |
| 52 | db = _GraphLiteBinding(path) |
| 53 | return cls(db) |
| 54 | except Exception as e: |
| 55 | raise ConnectionError(f"Failed to open database: {e}") |
| 56 | |
| 57 | def session(self, username: str): |
| 58 | """ |
no test coverage detected