gaffer_postgres (gaffer v0.3.0)
View SourcePure SQL query builder and serializer for Postgres drivers.
Summary
Functions
Query that fetches the current schema version.
Queries to create the migrations table if it does not exist.
Query that aggregates job counts and timestamps per state.
Query to atomically claim available jobs for execution.
Query to delete a job by ID.
Query to fetch a job by ID.
Query to list jobs matching the given filters.
Query to delete jobs older than per-state cutoffs for a queue.
Returns upsert queries for a single encoded job.
Queries to roll back a migration and decrement the version.
Queries to apply a migration and record its version.
Sorted list of all schema migrations as {Version, Up, Down} tuples.
Query to delete a queue by name.
Query to check whether a queue name exists.
Query to register a queue name. No-op if already registered.
Query to list all registered queue names.
Types
Functions
-spec applied_version() -> queries().
Query that fetches the current schema version.
-spec ensure_migrations_table() -> queries().
Queries to create the migrations table if it does not exist.
-spec info(gaffer:queue()) -> queries().
Query that aggregates job counts and timestamps per state.
Query to atomically claim available jobs for execution.
Query to delete a job by ID.
Query to fetch a job by ID.
Query to list jobs matching the given filters.
-spec job_prune(gaffer:queue(), map()) -> queries().
Query to delete jobs older than per-state cutoffs for a queue.
Returns upsert queries for a single encoded job.
-spec migrate_down({pos_integer(), _, queries()}) -> queries().
Queries to roll back a migration and decrement the version.
-spec migrate_up({pos_integer(), queries(), _}) -> queries().
Queries to apply a migration and record its version.
-spec migrations(Opts :: map()) -> [{Version :: pos_integer(), Up :: queries(), Down :: queries()}].
Sorted list of all schema migrations as {Version, Up, Down} tuples.
-spec queue_delete(gaffer:queue()) -> queries().
Query to delete a queue by name.
-spec queue_exists(gaffer:queue()) -> queries().
Query to check whether a queue name exists.
-spec queue_insert(gaffer:queue()) -> queries().
Query to register a queue name. No-op if already registered.
-spec queue_list() -> queries().
Query to list all registered queue names.