View Source Home

Elixir CI License: MIT Hex version badge Hexdocs badge

AshPagify

Welcome! AshPagify adds full-text search, scoping, filtering, ordering, and pagination APIs for the Ash Framework. Please refere to the documentation on hexdocs to get you started.

Installation

def deps do
  [
    {:ash_pagify, "~> 0.1.1"}
  ]
end

Features

  • Full-text search: AshPagify supports full-text search using the tsvector column in PostgreSQL.
  • Offset-based pagination: AshPagify uses OFFSET and LIMIT to paginate your queries.
  • Scoping: Apply predefined filters to your queries using a simple map syntax.
  • Filtering: Apply user-input filters to your queries using a simple map syntax. Allows complex data filtering using multiple conditions, operators, and fields. Also incooperates with AshPhoenix.FilterForm to provide a simple way to build complex filter user interfaces.
  • Sorting: Sort your queries by multiple fields and any directions.
  • UI helpers and URL builders: AshPagify provides a AshPagify.Meta struct with information about the current page, total pages, and more. This information can be used to build pagination links in your UI. Further, AshPagify provides the AshPagify.Components module with headless table and pagination components to easily build sortable tables and pagination links in your Phoenix LiveView. The AshPagify.FilterForm module provides a simple way to build filter forms for your LiveView.

Release Management

We use git_opts to manage our releases. To create a new release, run:

mix git_ops.release

This will bump the version, create a new tag, and push the changes to the repository. The GitHub action will then build and publish the new version to Hex.