Struct dbcrossbarlib::drivers::postgres::PostgresLocator [−][src]
pub struct PostgresLocator { /* fields omitted */ }
Expand description
A Postgres database URL and a table name.
This is the central point of access for talking to a running PostgreSQL database.
Trait Implementations
Provide a mechanism for casting a dyn Locator
back to the underlying,
concrete locator type using Rust’s Any
type. Read more
Return a table schema, if available.
fn count(
&self,
ctx: Context,
shared_args: SharedArguments<Unverified>,
source_args: SourceArguments<Unverified>
) -> BoxFuture<usize>
fn count(
&self,
ctx: Context,
shared_args: SharedArguments<Unverified>,
source_args: SourceArguments<Unverified>
) -> BoxFuture<usize>
Count the records specified by this locator.
fn local_data(
&self,
ctx: Context,
shared_args: SharedArguments<Unverified>,
source_args: SourceArguments<Unverified>
) -> BoxFuture<Option<BoxStream<CsvStream>>>
fn local_data(
&self,
ctx: Context,
shared_args: SharedArguments<Unverified>,
source_args: SourceArguments<Unverified>
) -> BoxFuture<Option<BoxStream<CsvStream>>>
If this locator can be used as a local data source, return a stream of CSV streams. This function type is bit hairy: Read more
fn write_local_data(
&self,
ctx: Context,
data: BoxStream<CsvStream>,
shared_args: SharedArguments<Unverified>,
dest_args: DestinationArguments<Unverified>
) -> BoxFuture<BoxStream<BoxFuture<BoxLocator>>>
fn write_local_data(
&self,
ctx: Context,
data: BoxStream<CsvStream>,
shared_args: SharedArguments<Unverified>,
dest_args: DestinationArguments<Unverified>
) -> BoxFuture<BoxStream<BoxFuture<BoxLocator>>>
If this locator can be used as a local data sink, write data to it. Read more
Write a table schema to this locator, if that’s the sort of thing that we can do. Read more
Should we display the individual output locations?
Can we access the data at source
directly using write_remote_data
?
fn write_remote_data(
&self,
_ctx: Context,
source: BoxLocator,
_shared_args: SharedArguments<Unverified>,
_source_args: SourceArguments<Unverified>,
_dest_args: DestinationArguments<Unverified>
) -> BoxFuture<Vec<BoxLocator>>
fn write_remote_data(
&self,
_ctx: Context,
source: BoxLocator,
_shared_args: SharedArguments<Unverified>,
_source_args: SourceArguments<Unverified>,
_dest_args: DestinationArguments<Unverified>
) -> BoxFuture<Vec<BoxLocator>>
Take the data at source
, and write to this locator directly, without
passing it through the local system. Read more
Auto Trait Implementations
impl RefUnwindSafe for PostgresLocator
impl Send for PostgresLocator
impl Sync for PostgresLocator
impl Unpin for PostgresLocator
impl UnwindSafe for PostgresLocator
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more