Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8ca47ccd
Commit
8ca47ccd
authored
Sep 14, 2021
by
Marcin Sedlak-Jakubowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ah-fix-in-operator-docs' into 'master'
Fix In Operator docs See merge request gitlab-org/gitlab!70285
parents
6da09830
042b7175
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
doc/development/database/efficient_in_operator_queries.md
doc/development/database/efficient_in_operator_queries.md
+4
-3
No files found.
doc/development/database/efficient_in_operator_queries.md
View file @
8ca47ccd
...
...
@@ -463,7 +463,7 @@ Gitlab::Pagination::Keyset::InOperatorOptimization::QueryBuilder.new(
<details>
<summary>
Expand this sentence to see the SQL query.
</summary>
<pre><code
lang=
'sql'
>
<pre><code>
SELECT "issues".
*
FROM
(WITH RECURSIVE "array_cte" AS MATERIALIZED
...
...
@@ -582,6 +582,7 @@ FROM
WHERE (COUNT
<>
0)) issues
LIMIT 20
</code>
</pre>
</details>
NOTE:
...
...
@@ -613,7 +614,7 @@ end
#### Keyset pagination
The optimization works out of the box with GraphQL and the
`keyset_paginate`
helper method.
Read more about
[
keyset pagination
](
database/
keyset_pagination.md
)
.
Read more about
[
keyset pagination
](
keyset_pagination.md
)
.
```
ruby
array_scope
=
Group
.
find
(
9970
).
all_projects
.
select
(
:id
)
...
...
@@ -637,7 +638,7 @@ issues = Issue
#### Offset pagination with Kaminari
The
`ActiveRecord`
scope produced by the
`InOperatorOptimization`
class can be used in
[
offset-paginated
](
database/
pagination_guidelines.md#offset-pagination
)
[
offset-paginated
](
pagination_guidelines.md#offset-pagination
)
queries.
```
ruby
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment