File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
documentation/topics/advanced Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -908,23 +908,14 @@ When an action supports both `offset` and `keyset` pagination (such as default r
908908- If ` offset ` is provided → offset pagination
909909
910910** 2. Configuration-based default for ambiguous cases:**
911- When only ` limit ` is provided, Ash checks your application configuration:
912-
913- ``` elixir
914- # Check your config/config.exs
915- config :ash , :default_page_type , :keyset # or :offset
916- ```
917-
918- - If ` config :ash, :default_page_type, :keyset ` → returns ` Ash.Page.Keyset `
919- - If ` config :ash, :default_page_type, :offset ` → returns ` Ash.Page.Offset `
920- - If no configuration is set → defaults to ` Ash.Page.Offset `
911+ Ash is configured to use keyset-pagination by default when installed with ` mix igniter.install ash ` , or the homepage installer.
921912
922913#### Practical Examples
923914
924915Regardless of configuration, the records will have keyset metadata, so you can always transition between pagination types:
925916
926917``` elixir
927- # Start with your configured default (could be offset or keyset)
918+ # By default, this uses keyset pagination
928919%{results: [_ , last]} = Ash .read! (Post , page: [limit: 2 ])
929920
930921# Explicitly use keyset pagination for the next page
You can’t perform that action at this time.
0 commit comments