Error implementations (#232)

Solves #216 by adding a check on table open for existence of the
`.lance` file. Does not check for it for remote connections.
This commit is contained in:
Leon Yee
2023-06-27 16:48:31 -07:00
committed by GitHub
parent 4bc676e26a
commit eb5bcda337
7 changed files with 113 additions and 8 deletions

View File

@@ -252,7 +252,7 @@ class LanceDBConnection:
if data is not None:
tbl = LanceTable.create(self, name, data, schema, mode=mode)
else:
tbl = LanceTable(self, name)
tbl = LanceTable.open(self, name)
return tbl
def open_table(self, name: str) -> LanceTable:
@@ -267,7 +267,7 @@ class LanceDBConnection:
-------
A LanceTable object representing the table.
"""
return LanceTable(self, name)
return LanceTable.open(self, name)
def drop_table(self, name: str):
"""Drop a table from the database.