# `AshPostgres.DataLayer.Info`
[🔗](https://github.com/ash-project/ash_postgres/blob/v2.8.0/lib/data_layer/info.ex#L5)

Introspection functions for 

# `base_filter_sql`

A stringified version of the base_filter, to be used in a where clause when generating unique indexes

# `calculation_to_sql`

# `calculations_to_sql`

A keyword list of calculations to their sql representation

# `check_constraints`

The configured check_constraints for a resource

# `create_table_options`

String passed to table/2 in the create table migration for a given resource

# `custom_indexes`

The configured custom_indexes for a resource

# `custom_statements`

The configured custom_statements for a resource

# `exclusion_constraint_names`

The configured exclusion_constraint_names

# `foreign_key_names`

The configured foreign_key_names

# `global_upsert_keys`

A list of keys to always include in upserts.

# `identity_index_names`

The configured identity_index_names

# `identity_where_to_sql`

```elixir
@spec identity_where_to_sql(Ash.Resource.t(), atom()) :: String.t() | nil
```

Returns the literal SQL for the `where` clause given a resource and an
identity name.

See `identity_wheres_to_sql/1` for more details.

# `identity_wheres_to_sql`

```elixir
@spec identity_wheres_to_sql(Ash.Resource.t()) :: keyword(String.t())
```

A keyword list of identity names to the literal SQL string representation of
the `where` clause portion of identity's partial unique index.

For example, given the following identity for a resource:

    identities do
      identity :active, [:status] do
        where expr(status == "active")
      end
    end

An appropriate `identity_wheres_to_sql` would need to be made to generate the
correct migration for the partial index used by the identity:

    postgres do
      ...

      identity_wheres_to_sql active: "status = 'active'"
    end

# `manage_tenant_create?`

Whether or not to create a tenant for a given resource

# `manage_tenant_template`

The template for a managed tenant

# `manage_tenant_update?`

Whether or not to update a tenant for a given resource

# `migrate?`

Whether or not the resource should be included when generating migrations

# `migration_defaults`

A keyword list of customized migration defaults

# `migration_ignore_attributes`

A list of attributes to be ignored when generating migrations

# `migration_types`

A keyword list of customized migration types

# `min_pg_version`

Gets the resource's repo's postgres version

# `pg_version_matches?`

Checks a version requirement against the resource's repo's postgres version

# `polymorphic?`

The configured polymorphic? for a resource

# `polymorphic_name`

The configured polymorphic_reference_name for a resource

# `polymorphic_on_delete`

The configured polymorphic_reference_on_delete for a resource

# `polymorphic_on_update`

The configured polymorphic_reference_on_update for a resource

# `reference`

The configured reference for a given relationship of a  resource

# `references`

The configured references for a resource

# `repo`

The configured repo for a resource

# `schema`

The configured schema for a resource

# `simple_join_first_aggregates`

# `skip_identities`

Identities not to include in the migrations

# `skip_unique_indexes`

Skip generating unique indexes when generating migrations

# `storage_types`

A keyword list of customized storage types

# `table`

The configured table for a resource

# `unique_index_names`

The configured unique_index_names

---

*Consult [api-reference.md](api-reference.md) for complete listing*
