Refine. FacetsTable
(Refine v0.3.0)
Copy Markdown
Facets table functions.
Summary
Types
@type create_facets_table_return() :: {:ok, String.t()} | {:error, :column_not_found, String.t()} | {:error, :column_names_not_unique} | {:error, :facets_table_exists, String.t()} | {:error, :identity_column_already_exists, String.t()} | {:error, :identity_column_invalid_type, String.t()} | {:error, :identity_column_not_found, String.t()} | {:error, :invalid_table_name, String.t()} | {:error, :table_names_not_unique} | {:error, Exception.t()}
@type database_option() :: {:repo, repo()} | postgrex_option()
@type database_options() :: [database_option()]
@type facet_configs() :: [facet_config()]
@type facets_table_config() :: %{ add_identity_column_if_not_exists: boolean() | nil, facets_table: String.t(), facets: facet_configs(), identity_column: String.t(), joins: join_configs() | nil, roaringbitmap_type: String.t() | nil, source_table: String.t() } | keyword()
@type join_configs() :: [join_config()]
@type postgrex_options() :: [postgrex_option()]
@type repo() :: module()
Functions
@spec create_facets_table(facets_table_config(), database_options()) :: create_facets_table_return()
@spec create_facets_table_if_not_exists( facets_table_config(), [database_option()] ) :: create_facets_table_return()
@spec drop_facets_table(facets_table_config(), database_options()) :: {:ok, String.t()} | {:error, :table_not_found} | {:error, Exception.t()}