Khepri 0.2.0 #52
dumbbell
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's new in Khepri 0.2.0
Stored procedures and triggers
This version introduces stored procedures and triggers. They allow to store code in the database itself and automatically execute it after some event occurs.
Store an anonymous function in the tree:
Register a trigger using an event filter:
In the example above, as soon as the
[stock, wood, <<"oak">>]node is created, updated or deleted, the anonymous function will be executed.See #47.
Use records to describe payloads instead of macros
Payloads are now described as Erlang records. This allows to benefit from more compile-time checks in particular.
Here are the modifications you will have to do in your code:
See #20.
keep_untilconditions renamed tokeep_whileThe
keep_untiloption ofkhepri_machine:put/3was renamed tokeep_while. The reason is that the tree node is kept while the condition is met. As soon as the condition evaluates to false, the tree node is deleted.Here are the modifications you will have to do in your code:
See #18.
Stacktrace frames pointing to an extracted function code have line numbers
Before, when a transaction function encounter an exception, the stacktrace would miss the source file and line number for frames pointing to the extracted code:
Now,
khepri_fundecode lines information and the stacktrace frames provide the source file and the line number:See #51.
Other changes
reErlang module are allowed in transaction functions (Transactions: Allowremodule #41).beam_disasm(khepri_fun: Patch incorrectly decoded instructions #39).var_infoannotations to assembly #36, preemptively infer var_info annotations #49).rebar as test dialyzer.Download
Khepri 0.2.0 is available from Hex.pm: https://hex.pm/packages/khepri/0.2.0
Upgrade
Using Rebar:
Update your
rebar.config:Run
rebar3 upgrade.Using Erlang.mk:
Update your
Makefile:%% In your Makefile dep_khepri = hex 0.2.0Remove the
deps/khepridirectory. The new version will be fetched the next time you build your project.Documentation
The documentation for Khepri 0.2.0 is available on Hex.pm.
This discussion was created from the release Khepri 0.2.0.
Beta Was this translation helpful? Give feedback.
All reactions