-
Notifications
You must be signed in to change notification settings - Fork 55
Joins #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Joins #763
Changes from all commits
13beed1
966631b
8004014
c7af565
a87eed3
93d414e
35f73e6
fc83d9b
c5c8010
f4bddd4
9c85f4e
f99eba7
3c6101f
6276e3b
e7a56b5
558820b
778d8da
4a1c539
f200707
3ca3335
ab49c0d
c44bee5
7bc1fe9
608e5ec
a0ca81d
ad0c884
601db10
2de99c0
c2a4ba1
ba65745
6bde5ab
f41ee35
67f1bbb
1fff442
5a21d10
0d0f591
e38cfcc
71a45b1
8c882dc
a965c71
026ec5e
a7f9a2d
22c108d
8caa65f
93e7265
bd4387a
785e0c1
bf293fc
1f1ea34
ccbb984
f807737
651a24c
7d0fe4f
55e752c
1de5d05
345b251
ab07713
9421014
daa635b
c15a69b
f5e717e
30d8f87
0f3e6a9
6649bd9
7e837ca
311555c
1346015
fd05e50
7fea0b3
ce0bf8f
0ef44d8
40b9aae
3c4db4a
a681979
e18746a
dfd5c3c
2e0cd91
7d99f75
ffb9ea4
3770ab0
4586145
9d91078
31c25ab
bf4219b
106da41
2f2a64a
735e0d3
c854fdd
d4e85d8
0a1faa1
d2796e4
1cc6d6c
45d8e25
b438259
ba58a25
e099596
321e468
70a4b5c
16c822e
02d269d
f7ae73c
cb814c1
a9032c6
a427a45
8f688ae
747dce3
eb51766
8f563d7
953afd3
4c39033
4d4caf6
32aa3f9
22f92e3
dcb4263
c418511
f51ca0f
f42c411
dd15243
d0d0e10
679c278
7085327
39d6689
2ba2962
ea48ad9
cad5e4d
229905c
e2464b2
93fab9c
c7220b1
0c3377d
162b349
b931486
97ea8e0
926a9bc
98481c4
480ee8e
f3948c3
9e452e0
ae290f7
3382681
8882ab9
5469b7a
be4ee60
1a24c9b
6ef75b3
79eb87c
19656f9
9dcd729
77d7d86
ccb62c0
214f113
acfca83
e0e68ef
f6511fe
18aceea
f6247b5
8e3bb10
8bb648f
859f9a7
fc33f79
a69f670
8bf4fbf
11e47d8
188df04
9f1d163
e3a29be
9a26656
78a0597
74dde75
cdfb127
f44a464
3a901dc
ac63baf
4391e9f
924e856
c3e2131
8458868
58231d6
81ba383
c4c5ca0
2f11cea
d2495d3
e112681
490ad15
1fbc72a
2c32097
c38aa72
3b4ed0b
d5df459
bb651d6
0359bb7
689a8ea
5d04a28
2e7569d
d3f2e8a
a732ab4
74e9df8
0c78f5b
ddf2e19
c334bf4
69d7013
67ed804
467a9ea
d99e179
921ee55
1a33a24
1ff480f
a844b1c
45a237c
b4d14af
6339269
bc98c1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -812,18 +812,33 @@ abstract public function deleteDocuments(string $collection, array $sequences, a | |
| * | ||
| * Find data sets using chosen queries | ||
| * | ||
| * @param Document $collection | ||
| * @param array<Query> $queries | ||
| * @param QueryContext $context | ||
| * @param int|null $limit | ||
| * @param int|null $offset | ||
| * @param array<string> $orderAttributes | ||
| * @param array<string> $orderTypes | ||
| * @param array<string, mixed> $cursor | ||
| * @param string $cursorDirection | ||
| * @param string $forPermission | ||
| * @param array<Query> $selects | ||
| * @param array<Query> $filters | ||
| * @param array<Query> $joins | ||
| * @param array<Query> $vectors | ||
| * @param array<Query> $orderQueries | ||
| * | ||
| * @return array<Document> | ||
| */ | ||
| abstract public function find(Document $collection, array $queries = [], ?int $limit = 25, ?int $offset = null, array $orderAttributes = [], array $orderTypes = [], array $cursor = [], string $cursorDirection = Database::CURSOR_AFTER, string $forPermission = Database::PERMISSION_READ): array; | ||
| abstract public function find( | ||
| QueryContext $context, | ||
| ?int $limit = 25, | ||
| ?int $offset = null, | ||
| array $cursor = [], | ||
| string $cursorDirection = Database::CURSOR_AFTER, | ||
| string $forPermission = Database::PERMISSION_READ, | ||
| array $selects = [], | ||
| array $filters = [], | ||
| array $joins = [], | ||
| array $vectors = [], | ||
| array $orderQueries = [] | ||
| ): array; | ||
|
|
||
| /** | ||
| * Sum an attribute | ||
|
|
@@ -840,13 +855,19 @@ abstract public function sum(Document $collection, string $attribute, array $que | |
| /** | ||
| * Count Documents | ||
| * | ||
| * @param Document $collection | ||
| * @param array<Query> $queries | ||
| * @param QueryContext $context | ||
| * @param int|null $max | ||
| * @param array<Query> $filters | ||
| * @param array<Query> $joins | ||
| * | ||
| * @return int | ||
| */ | ||
| abstract public function count(Document $collection, array $queries = [], ?int $max = null): int; | ||
| abstract public function count( | ||
| QueryContext $context, | ||
| ?int $max, | ||
| array $filters, | ||
| array $joins, | ||
| ): int; | ||
|
Comment on lines
+865
to
+870
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Check PHP version requirements in composer.json
if [ -f composer.json ]; then
cat composer.json | jq '.require.php // .config.platform.php // empty'
fiRepository: utopia-php/database Length of output: 70 🏁 Script executed: # Find the exact location and content of the method
cat -n src/Database/Adapter.php | sed -n '860,875p'Repository: utopia-php/database Length of output: 514 🏁 Script executed: # Search for all implementations of count() method to check override compatibility
rg -B 2 -A 5 'function count\(' --type phpRepository: utopia-php/database Length of output: 2421 Fix override compatibility violation in The abstract method requires Ensure all concrete adapters match the abstract signature exactly: remove the The trailing comma after |
||
|
|
||
| /** | ||
| * Get Collection Size of the raw data | ||
|
|
@@ -1236,36 +1257,10 @@ abstract public function getAttributeWidth(Document $collection): int; | |
| abstract public function getKeywords(): array; | ||
|
|
||
| /** | ||
| * Get an attribute projection given a list of selected attributes | ||
| * | ||
| * @param array<string> $selections | ||
| * @param string $prefix | ||
| * @param array<Query> $selects | ||
| * @return mixed | ||
| */ | ||
| abstract protected function getAttributeProjection(array $selections, string $prefix): mixed; | ||
|
|
||
| /** | ||
| * Get all selected attributes from queries | ||
| * | ||
| * @param Query[] $queries | ||
| * @return string[] | ||
| */ | ||
| protected function getAttributeSelections(array $queries): array | ||
| { | ||
| $selections = []; | ||
|
|
||
| foreach ($queries as $query) { | ||
| switch ($query->getMethod()) { | ||
| case Query::TYPE_SELECT: | ||
| foreach ($query->getValues() as $value) { | ||
| $selections[] = $value; | ||
| } | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| return $selections; | ||
| } | ||
| abstract protected function getAttributeProjection(array $selects): mixed; | ||
|
|
||
| /** | ||
| * Filter Keys | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.