# ash_postgres v2.6.28 - Table of Contents ## Pages - [Home](readme.md) - [AshPostgres.DataLayer](dsl-ashpostgres-datalayer.md) - Tutorials - [Get Started With Postgres](get-started-with-ash-postgres.md) - [Setting AshPostgres up with an existing database](set-up-with-existing-database.md) - Resources - [What is AshPostgres?](what-is-ash-postgres.md) - [References](references.md) - [Polymorphic Resources](polymorphic-resources.md) - [Migrations](migrations-and-tasks.md) - [Testing with AshPostgres](testing.md) - [Upgrading to 2.0](upgrading-to-2-0.md) - [Using Postgres 18](upgrading-to-postgres-18.md) - [Expressions](expressions.md) - [Manual Relationships](manual-relationships.md) - [Partitioned Tables](partitioned-tables.md) - [Schema Based Multitenancy](schema-based-multitenancy.md) - [Using Multiple Repos](using-multiple-repos.md) - About AshPostgres - [Change Log](changelog.md) ## Modules - [AshPostgres.Extensions.ImmutableRaiseError](AshPostgres.Extensions.ImmutableRaiseError.md): An extension that installs an immutable version of ash_raise_error. - [AshPostgres.Igniter](AshPostgres.Igniter.md): Codemods and utilities for working with AshPostgres & Igniter - [AshPostgres.MigrationCompileCache](AshPostgres.MigrationCompileCache.md): A cache for the compiled migrations. - [AshPostgres.Functions.Binding](AshPostgres.Functions.Binding.md): Refers to the current table binding. - [AshPostgres.Functions.VectorL2Distance](AshPostgres.Functions.VectorL2Distance.md): Maps to the vector l2 distance operator. Requires `vector` extension to be installed. - AshPostgres - [AshPostgres](AshPostgres.md): The AshPostgres extension gives you tools to map a resource to a postgres database table. - [AshPostgres.DataLayer](AshPostgres.DataLayer.md): A postgres data layer that leverages Ecto's postgres capabilities. - [AshPostgres.Repo](AshPostgres.Repo.md): Resources that use `AshPostgres.DataLayer` use a `Repo` to access the database. - Utilities - [AshPostgres.ManualRelationship](AshPostgres.ManualRelationship.md): A behavior for postgres-specific manual relationship functionality - Introspection - [AshPostgres.CheckConstraint](AshPostgres.CheckConstraint.md): Represents a configured check constraint on the table backing a resource - [AshPostgres.CustomExtension](AshPostgres.CustomExtension.md): A custom extension implementation. - [AshPostgres.CustomIndex](AshPostgres.CustomIndex.md): Represents a custom index on the table backing a resource - [AshPostgres.DataLayer.Info](AshPostgres.DataLayer.Info.md): Introspection functions for - [AshPostgres.Reference](AshPostgres.Reference.md): Represents the configuration of a reference (i.e foreign key). - [AshPostgres.Statement](AshPostgres.Statement.md): Represents a custom statement to be run in generated migrations - Types - [AshPostgres.Ltree](AshPostgres.Ltree.md): Ash Type for [postgres `ltree`](https://www.postgresql.org/docs/current/ltree.html), a hierarchical tree-like data type. - [AshPostgres.Timestamptz](AshPostgres.Timestamptz.md): Implements the PostgresSQL [timestamptz](https://www.postgresql.org/docs/current/datatype-datetime.html) (aka `timestamp with time zone`) type. - [AshPostgres.TimestamptzUsec](AshPostgres.TimestamptzUsec.md): Implements the PostgresSQL [timestamptz](https://www.postgresql.org/docs/current/datatype-datetime.html) (aka `timestamp with time zone`) type with nanosecond precision. - [AshPostgres.Tsquery](AshPostgres.Tsquery.md): A thin wrapper around `:string` for working with tsquery types in calculations. - [AshPostgres.Tsvector](AshPostgres.Tsvector.md): A type for representing postgres' tsvectors. - [AshPostgres.Type](AshPostgres.Type.md): Postgres specific callbacks for `Ash.Type`. - Extensions - [AshPostgres.Extensions.Vector](AshPostgres.Extensions.Vector.md): An extension that adds support for the `vector` type. - Custom Aggregates - [AshPostgres.CustomAggregate](AshPostgres.CustomAggregate.md): A custom aggregate implementation for ecto. - Postgres Migrations - [AshPostgres.Migration](AshPostgres.Migration.md): Utilities for use in migrations - [EctoMigrationDefault](EctoMigrationDefault.md): Allows configuring how values are translated to default values in migrations. - Expressions - [AshPostgres.Functions.ILike](AshPostgres.Functions.ILike.md): Maps to the builtin postgres function `ilike`. - [AshPostgres.Functions.Like](AshPostgres.Functions.Like.md): Maps to the builtin postgres function `like`. - [AshPostgres.Functions.TrigramSimilarity](AshPostgres.Functions.TrigramSimilarity.md): Maps to the builtin postgres trigram similarity function. Requires `pgtrgm` extension to be installed. - [AshPostgres.Functions.VectorCosineDistance](AshPostgres.Functions.VectorCosineDistance.md): Maps to the vector cosine distance operator. Requires `vector` extension to be installed. ## Mix Tasks - [mix ash_postgres.create](Mix.Tasks.AshPostgres.Create.md): Create the storage for repos in all resources for the given (or configured) domains. - [mix ash_postgres.drop](Mix.Tasks.AshPostgres.Drop.md): Drop the storage for the given repository. - [mix ash_postgres.gen.resources](Mix.Tasks.AshPostgres.Gen.Resources.md): Generates resources based on a database schema - [mix ash_postgres.generate_migrations](Mix.Tasks.AshPostgres.GenerateMigrations.md): Generates migrations, and stores a snapshot of your resources. - [mix ash_postgres.install](Mix.Tasks.AshPostgres.Install.md): Installs AshPostgres. Should be run with `mix igniter.install ash_postgres` - [mix ash_postgres.migrate](Mix.Tasks.AshPostgres.Migrate.md): Runs the pending migrations for the given repository. - [mix ash_postgres.rollback](Mix.Tasks.AshPostgres.Rollback.md): Reverts applied migrations in the given repository. Migrations are expected at "priv/YOUR_REPO/migrations" directory of the current application but it can be configured by specifying the `:priv` key under the repository configuration. Runs the latest applied migration by default. To roll back to a version number, supply `--to version_number`. To roll back a specific number of times, use `--step n`. To undo all applied migrations, provide `--all`. - [mix ash_postgres.setup_vector](Mix.Tasks.AshPostgres.SetupVector.md): Sets up pgvector for AshPostgres - [mix ash_postgres.squash_snapshots](Mix.Tasks.AshPostgres.SquashSnapshots.md): Cleans snapshots folder, leaving only one snapshot per resource.