- Download/Installation:
- on Ubuntu:
sudo service eventstore start
- Admin GUI: http://127.0.0.1:2113 (admin:changeit)
- When eventstore is installed on host instead of in the virtualbox, use port forwarding:
vagrant ssh -- -R 2113:localhost:2113
- Introduction: http://docs.geteventstore.com/introduction/
- Store events to a stream:
- streams are automatically created by posting data for the stream name
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
#set up the dir structure if it doesn't exist | |
set t ~/.trello; mkdir -p $t | |
function if_exist # we don't want to litter our code with ifs if a read model or events are not there yet. Return /dev/nul for empty | |
if test -e $t/$argv[1]; echo $t/$argv[1]; else; echo /dev/null; end | |
end | |
function list # provide lists from our tab delimited entries with filtering and line item numbers to make choices | |
set list $argv[1]; set column_to_show $argv[2]; set filter $argv[3]; set count 1 | |
cat (if_exist $list) | grep -e "$filter\$" | while read line | |
set -l line_items (string split \t $line) | |
echo $count\) $line_items[$column_to_show] |
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
// adapted from https://github.com/gregoryyoung/m-r/blob/master/SimpleCQRS/CommandHandlers.cs | |
// actual code https://github.com/thinkbeforecoding/m-r/tree/FSharp/FsSimpleCQRS | |
module Commands = | |
//[<Abstract>] | |
type DeactivateInventoryItem = | |
{ | |
InventoryItemId: Guid | |
OriginalVersion: int // version I'm acting on, for checking to make sure my change only fires if the data the change was based on is still unchanged |