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

Add new entries to db #8

Open
CMurtagh-LGTM opened this issue Mar 24, 2022 · 2 comments
Open

Add new entries to db #8

CMurtagh-LGTM opened this issue Mar 24, 2022 · 2 comments

Comments

@CMurtagh-LGTM
Copy link

Hi
Would it be possible to have an option where incrementing a value not in the database will add it, rather than give the error Error: ErrorMessage { msg: "Entry not found in database" }?

@YodaEmbedding
Copy link
Owner

YodaEmbedding commented Mar 24, 2022

As a workaround, this should work:

frece add fruits.db "apples" 2&>/dev/null
frece increment fruits.db "apples"

I could perhaps add something like an --add or --force flag:

frece increment --add fruits.db "apples"

@CMurtagh-LGTM
Copy link
Author

Yeah, something like the --add flag is what I'm thinking.
I'm using the workaround now.

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

No branches or pull requests

2 participants