Skip to content
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

Merged

Conversation

grzegorz-roboflow
Copy link
Contributor

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.

  • New feature (non-breaking change which adds functionality)

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

self._columns = {**columns, **{"id": "INTEGER PRIMARY KEY"}}

if not connection:
if not os.path.exists(os.path.dirname(db_file_path)):
Copy link
Collaborator

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,
):
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@grzegorz-roboflow grzegorz-roboflow merged commit 37b77af into main Aug 29, 2024
58 checks passed
@grzegorz-roboflow grzegorz-roboflow deleted the abstract-sqlite3-wrapper-in-usage-collector-sqlite-queue branch August 29, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants