Commit 042b7175 authored by Adam Hegyi's avatar Adam Hegyi

Fix IN operator optimization docs

Fix IN operator optimization docs.
parent 97b7e052
...@@ -463,7 +463,7 @@ Gitlab::Pagination::Keyset::InOperatorOptimization::QueryBuilder.new( ...@@ -463,7 +463,7 @@ Gitlab::Pagination::Keyset::InOperatorOptimization::QueryBuilder.new(
<details> <details>
<summary>Expand this sentence to see the SQL query.</summary> <summary>Expand this sentence to see the SQL query.</summary>
<pre><code lang='sql'> <pre><code>
SELECT "issues".* SELECT "issues".*
FROM FROM
(WITH RECURSIVE "array_cte" AS MATERIALIZED (WITH RECURSIVE "array_cte" AS MATERIALIZED
...@@ -582,6 +582,7 @@ FROM ...@@ -582,6 +582,7 @@ FROM
WHERE (COUNT <> 0)) issues WHERE (COUNT <> 0)) issues
LIMIT 20 LIMIT 20
</code> </code>
</pre>
</details> </details>
NOTE: NOTE:
...@@ -613,7 +614,7 @@ end ...@@ -613,7 +614,7 @@ end
#### Keyset pagination #### Keyset pagination
The optimization works out of the box with GraphQL and the `keyset_paginate` helper method. 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 ```ruby
array_scope = Group.find(9970).all_projects.select(:id) array_scope = Group.find(9970).all_projects.select(:id)
...@@ -637,7 +638,7 @@ issues = Issue ...@@ -637,7 +638,7 @@ issues = Issue
#### Offset pagination with Kaminari #### Offset pagination with Kaminari
The `ActiveRecord` scope produced by the `InOperatorOptimization` class can be used in 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. queries.
```ruby ```ruby
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment