Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

add sqlite pragma support #30

Merged
merged 11 commits into from
Dec 31, 2021
Merged

add sqlite pragma support #30

merged 11 commits into from
Dec 31, 2021

Conversation

plaisted
Copy link
Contributor

@plaisted plaisted commented Dec 18, 2021

What changed?
Adds ability to specify sqlite pragma statements from CLI.

Why?
Pragmas allow tweaking sqlite settings to particular use cases including improved performance. See #26

How did you test it?
Manually validated options caused desired sqlite changes.

Potential risks
User could supply pragma statements incompatible with temporalite functionality or resulting in corrupt databases.

Is hotfix candidate?
No.

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2021

Codecov Report

Merging #30 (9f295f6) into main (5d2482f) will decrease coverage by 2.66%.
The diff coverage is 2.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   45.39%   42.73%   -2.67%     
==========================================
  Files          11       11              
  Lines         652      695      +43     
==========================================
+ Hits          296      297       +1     
- Misses        337      377      +40     
- Partials       19       21       +2     
Impacted Files Coverage Δ
cmd/temporalite/main.go 1.58% <0.00%> (-0.30%) ⬇️
options.go 46.80% <0.00%> (-9.61%) ⬇️
server.go 59.74% <0.00%> (-3.28%) ⬇️
internal/liteconfig/config.go 81.33% <9.09%> (-5.72%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d2482f...9f295f6. Read the comment docs.

internal/liteconfig/config.go Outdated Show resolved Hide resolved
cmd/temporalite/main.go Outdated Show resolved Hide resolved
cmd/temporalite/main.go Outdated Show resolved Hide resolved
cmd/temporalite/main.go Outdated Show resolved Hide resolved
cmd/temporalite/main.go Outdated Show resolved Hide resolved
cmd/temporalite/main.go Outdated Show resolved Hide resolved
plaisted and others added 3 commits December 30, 2021 11:05
Initial review changes, need a few manual updates as well.

Co-authored-by: Jacob LeGrone <jlegrone@users.noreply.github.com>
Copy link
Collaborator

@jlegrone jlegrone left a comment

Choose a reason for hiding this comment

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

🚀 thanks for the contribution! Just need to fix the merge conflict (there's also a small typo I just noticed).

@@ -35,6 +36,7 @@ const (
ipFlag = "ip"
logFormatFlag = "log-format"
namespaceFlag = "namespace"
pragmaFLag = "sqlite-pragma"
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo

Suggested change
pragmaFLag = "sqlite-pragma"
pragmaFlag = "sqlite-pragma"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants