-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstract sqlite3 wrapper in usage collector sqlite queue #619
Abstract sqlite3 wrapper in usage collector sqlite queue #619
Conversation
…nference.core.utils.sqlite_wrapper
self._columns = {**columns, **{"id": "INTEGER PRIMARY KEY"}} | ||
|
||
if not connection: | ||
if not os.path.exists(os.path.dirname(db_file_path)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] os.makedirs(..., exist_ok=True)
should get the job done
self, | ||
values: Dict[ColName, ColValue], | ||
connection: Optional[sqlite3.Connection] = None, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could u give return types annotations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, this method should not return, modified a bit to re-rise instead.
Description
Abstract sqlite3 wrapper in usage collector sqlite queue; preparation for storing plan details in sqlite cache
Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
Added unit tests covering new functionality
Any specific deployment considerations
N/A
Docs
N/A