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

Sqlite store impl #287

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

Sqlite store impl #287

wants to merge 25 commits into from

Conversation

gferon
Copy link
Collaborator

@gferon gferon commented Oct 24, 2024

No description provided.

@Schmiddiii
Copy link
Contributor

I would guess presage-store-sqlite/.sqlx should be in gitignore?

@gferon
Copy link
Collaborator Author

gferon commented Oct 24, 2024

I would guess presage-store-sqlite/.sqlx should be in gitignore?

Not at all, quite the opposite! These are files that you generate with cargo sqlx prepare and let you compile check your SQL statements.

@Schmiddiii
Copy link
Contributor

Just saying that the official sqlx repo also has it gitignored.
See also the PR that ignored it.

Instead, this should probably be generated and checked in CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should also be gitignored. As well as the top-level presage.sqlite.

let device_id: u32 = address.device_id().into();
let record_data = record.serialize()?;
query!(
"INSERT INTO sessions ( address, device_id, identity, record ) VALUES ( $1, $2, $3, $4 )",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, sessions should also be replaced when they already exist (looking at WF).
The same probably also for the various types of keys.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give it another look when it's not a draft anymore?

I plan on double checking constraints on tables themselves, and most tables already have PRIMARY KEY(...) ON CONFLICT REPLACE.

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