pub struct TaskTables { /* private fields */ }
Expand description
TaskTables
is used for creating the necessary tables/views/functions in
a postgres database. It implements TaskTableProvider
and can be passed
to crate::Task
and crate::Worker
that use it for finding out what
postgres entities to use.
Use TaskTableBuilder
to create it or use TaskTables::default()
if you
are OK with default set of postgres entities.
That default will create:
- table
public.tasks
- view
public.tasks_ready
- function
public.notify
- function
public.notify_done
Implementations§
Source§impl TaskTables
impl TaskTables
Sourcepub async fn exists(&self, pool: &Pool<Postgres>) -> Result<bool>
pub async fn exists(&self, pool: &Pool<Postgres>) -> Result<bool>
Check if the necessary postgres entities have been installed already.
Trait Implementations§
Source§impl Clone for TaskTables
impl Clone for TaskTables
Source§fn clone(&self) -> TaskTables
fn clone(&self) -> TaskTables
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TaskTables
impl Debug for TaskTables
Source§impl Default for TaskTables
impl Default for TaskTables
Source§impl TaskTableProvider for TaskTables
impl TaskTableProvider for TaskTables
fn schema_name(&self) -> &str
fn tasks_table(&self) -> &str
fn tasks_ready_view(&self) -> &str
fn tasks_notify_fn(&self) -> &str
fn tasks_notify_done_fn(&self) -> &str
fn tasks_queue_name(&self) -> &str
fn tasks_queue_done_name(&self) -> String
fn tasks_table_full_name(&self) -> String
fn tasks_ready_view_full_name(&self) -> String
fn tasks_notify_fn_full_name(&self) -> String
fn tasks_notify_done_fn_full_name(&self) -> String
Auto Trait Implementations§
impl Freeze for TaskTables
impl RefUnwindSafe for TaskTables
impl Send for TaskTables
impl Sync for TaskTables
impl Unpin for TaskTables
impl UnwindSafe for TaskTables
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more