Skip to content

Commit

Permalink
Merge pull request #85 from dolittle/6.6.0-sam
Browse files Browse the repository at this point in the history
Sam: Copy Projection read models to MongoDB for querying
  • Loading branch information
jakhog authored Feb 9, 2022
2 parents fa69f24 + 5703cee commit 5d7077b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Contracts CI/CD

env:
PRERELEASE_BRANCHES: gimli # Comma separated list of prerelease branch names. 'alpha,rc, ...'
PRERELEASE_BRANCHES: sam # Comma separated list of prerelease branch names. 'alpha,rc, ...'

on:
push:
Expand Down
32 changes: 32 additions & 0 deletions Source/Runtime/Events.Processing/Projections.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "Fundamentals/Services/Ping.proto";
import "Runtime/Events.Processing/StreamEvent.proto";
import "Runtime/Events.Processing/Processors.proto";
import "Runtime/Projections/State.proto";
import "google/protobuf/wrappers.proto";

package dolittle.runtime.events.processing;

Expand All @@ -37,12 +38,43 @@ message ProjectionEventSelector {
}
}

message ProjectionCopyToMongoDB {
string collection = 1;
repeated PropertyConversion conversions = 2;

message PropertyConversion {
string propertyName = 1;
BSONType convertTo = 2;
google.protobuf.StringValue renameTo = 3;
repeated PropertyConversion children = 4;
}

enum BSONType {
None = 0;

DateAsDate = 1;
DateAsArray = 2;
DateAsDocument = 3;
DateAsString = 4;
DateAsInt64 = 5;

GUIDAsStandardBinary = 6;
GUIDAsCSharpLegacyBinary = 8;
GUIDAsString = 9;
}
}

message ProjectionCopies {
ProjectionCopyToMongoDB mongoDB = 1;
}

message ProjectionRegistrationRequest {
services.ReverseCallArgumentsContext callContext = 1;
protobuf.Uuid scopeId = 2;
protobuf.Uuid projectionId = 3;
repeated ProjectionEventSelector events = 4;
string initialState = 5;
ProjectionCopies copies = 6;
}

message ProjectionReplaceResponse {
Expand Down

0 comments on commit 5d7077b

Please sign in to comment.