Add ability to subscribe to table updates.

This was implemented based on
[this](https://www.sqlite.org/c3ref/update_hook.html) document.
This commit is contained in:
Connor Rigby
2018-11-29 13:29:15 -08:00
parent ab25c2d2b6
commit 8fa063a3f1
4 changed files with 307 additions and 187 deletions

View File

@@ -23,6 +23,7 @@
%% low-level exports
-export([start/0,
open/4,
set_update_hook/4,
exec/4,
changes/3,
insert/4,
@@ -62,6 +63,9 @@ start() ->
open(_Db, _Ref, _Dest, _Filename) ->
erlang:nif_error(nif_library_not_loaded).
set_update_hook(_Db, _Ref, _Dest, _Pid) ->
erlang:nif_error(nif_library_not_loaded).
%% @doc Exec the query.
%%
%% Sends an asynchronous exec command over the connection and returns