Skip to content

Commit

Permalink
raise clear error if no schema
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <praneeth@bpraneeth.com>
  • Loading branch information
bedapudi6788 committed Oct 30, 2023
1 parent 528364c commit 0710306
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion liteindex/defined_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def __init__(
self.local_storage = threading.local()

self._validate_set_schema_if_exists()

if not self.schema:
raise ValueError("Schema must be provided")

self._parse_schema()
self._create_table_and_meta_table()

Expand Down Expand Up @@ -255,7 +259,6 @@ def update(self, data):

transactions.append([_data[key] for key in all_columns])

print(sql, transactions)
self._connection.executemany(sql, transactions)

self._connection.commit()
Expand Down

0 comments on commit 0710306

Please sign in to comment.