File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -95,17 +95,17 @@ $writtenEvents = $client->writeEvents([
9595
9696* Note that according to the CloudEvents standard, event IDs must be of type string.*
9797
98- #### Using the ` isEventQlTrue ` precondition
98+ #### Using the ` isEventQlQueryTrue ` precondition
9999
100- If you want to write events depending on an EventQL query, use the ` IsEventQlTrue ` function to create a precondition:
100+ If you want to write events depending on an EventQL query, use the ` IsEventQlQueryTrue ` function to create a precondition:
101101
102102``` php
103- use Thenativeweb\Eventsourcingdb\IsEventQlTrue ;
103+ use Thenativeweb\Eventsourcingdb\IsEventQlQueryTrue ;
104104
105105$writtenEvents = $client->writeEvents([
106106 // events
107107], [
108- new IsEventQlTrue ("FROM e IN events WHERE e.type == 'io.eventsourcingdb.library.book-borrowed' PROJECT INTO COUNT() < 10")
108+ new IsEventQlQueryTrue ("FROM e IN events WHERE e.type == 'io.eventsourcingdb.library.book-borrowed' PROJECT INTO COUNT() < 10")
109109]);
110110```
111111
Original file line number Diff line number Diff line change 66
77use JsonSerializable ;
88
9- final readonly class IsEventQlTrue implements JsonSerializable
9+ final readonly class IsEventQlQueryTrue implements JsonSerializable
1010{
1111 public function __construct (
1212 public string $ query ,
@@ -16,7 +16,7 @@ public function __construct(
1616 public function jsonSerialize (): array
1717 {
1818 return [
19- 'type ' => 'isEventQlTrue ' ,
19+ 'type ' => 'isEventQlQueryTrue ' ,
2020 'payload ' => [
2121 'query ' => $ this ->query ,
2222 ],
Original file line number Diff line number Diff line change 55use PHPUnit \Framework \TestCase ;
66use Thenativeweb \Eventsourcingdb \CloudEvent ;
77use Thenativeweb \Eventsourcingdb \EventCandidate ;
8- use Thenativeweb \Eventsourcingdb \IsEventQlTrue ;
8+ use Thenativeweb \Eventsourcingdb \IsEventQlQueryTrue ;
99use Thenativeweb \Eventsourcingdb \IsSubjectOnEventId ;
1010use Thenativeweb \Eventsourcingdb \IsSubjectPristine ;
1111use Thenativeweb \Eventsourcingdb \Tests \ClientTestTrait ;
@@ -139,7 +139,7 @@ public function testSupportsTheIsSubjectOnEventIdPrecondition(): void
139139 );
140140 }
141141
142- public function testSupportsTheIsEventQlTruePrecondition (): void
142+ public function testSupportsTheIsEventQlQueryTruePrecondition (): void
143143 {
144144 $ firstEvent = new EventCandidate (
145145 source: 'https://www.eventsourcingdb.io ' ,
@@ -169,7 +169,7 @@ public function testSupportsTheIsEventQlTruePrecondition(): void
169169 $ secondEvent ,
170170 ],
171171 [
172- new IsEventQlTrue ('FROM e IN events PROJECT INTO COUNT() == 0 ' ),
172+ new IsEventQlQueryTrue ('FROM e IN events PROJECT INTO COUNT() == 0 ' ),
173173 ],
174174 );
175175 }
You can’t perform that action at this time.
0 commit comments