We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba7956f commit c4cfcf1Copy full SHA for c4cfcf1
examples/official-site/sqlpage/migrations/70_pagination.sql
@@ -28,7 +28,8 @@ with recursive pages as (
28
select
29
(offset/100+1) as contents,
30
sqlpage.link(sqlpage.path(), json_object(''offset'', offset)) as link,
31
- (offset/100+1 = $offset) as active from pages;
+ offset = coalesce(cast($offset as integer), 0) as active
32
+from pages;
33
```
34
35
For more advanced usage, the [pagination guide](blog.sql?post=How+to+use+the+pagination+component) provides a complete tutorial.
0 commit comments