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

Provide easy to use buffer for writes #31

Open
timClicks opened this issue Aug 27, 2014 · 3 comments
Open

Provide easy to use buffer for writes #31

timClicks opened this issue Aug 27, 2014 · 3 comments

Comments

@timClicks
Copy link

SQLite does not support concurrent writes. It would be great if erlang-sqlite3 provided an easy-to-use queue that INSERT commands could be sent to via multiple processes, but that would be written sequentially to the database...

@alexeyr
Copy link
Owner

alexeyr commented Oct 9, 2014

The gen_server process is already acting like such a buffer. Do you mean that you call sqlite3:open (or start_link) multiple times for the same database? Or that you want an async API for writing to the database in addition to the current one?

@timClicks
Copy link
Author

An async API would be really nice.

@alexeyr
Copy link
Owner

alexeyr commented Nov 24, 2014

In this case, pull requests are welcome :) Otherwise, I'll add it eventually, but I am not sure when I'll have time. Do you just want fire-and-forget or for a message to be sent when the write is done? I'd prefer the second option (and it's easy to ignore the reply if you don't need it).

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