-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Endpoint for process state and events in one transaction (#562)
- Loading branch information
1 parent
8483440
commit d1cff20
Showing
14 changed files
with
1,243 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/Storage/Migration/FunctionsAndProcedures/insertinstanceevents.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
CREATE OR REPLACE PROCEDURE storage.insertinstanceevents(_instance UUID, _events JSONB) | ||
LANGUAGE 'plpgsql' | ||
AS $BODY$ | ||
BEGIN | ||
INSERT INTO storage.instanceevents (instance, alternateid, event) | ||
SELECT _instance, (evs->>'Id')::UUID, jsonb_strip_nulls(evs) | ||
FROM jsonb_array_elements(_events) evs; | ||
END; | ||
$BODY$; |
Oops, something went wrong.