from your example at https://eventstore.org/docs/projections/user-defined-projections/index.html
options({
resultStreamName: "my_demo_projection_result",
$includeLinks: false,
reorderEvents: false,
processingLag: 0
})
fromStream('account-1')
.when({
$init:function(){
return {
count: 0
}
},
myEventType: function(state, event){
state.count += 1;
}
})
.transformBy(function(state){
state.count = 10;
})
.outputState()
Can you select with a most sophisticated selector like fromStream('account-{?d}')
to apply that projection for each account ?