pub trait CopyInHandler: Send + Sync {
// Required methods
fn copy_in_table<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
catalog: &'life1 str,
schema: &'life2 str,
table: &'life3 str,
query_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Option<TableInfoRef>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn copy_in_insert<'life0, 'async_trait>(
&'life0 self,
requests: RowInsertRequests,
query_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler for the PostgreSQL COPY ... FROM STDIN (copy-in) sub-protocol.
The servers layer owns the wire protocol and data parsing; this trait is the boundary to catalog lookup and ingestion, implemented by the frontend instance.
Required Methods§
Sourcefn copy_in_table<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
catalog: &'life1 str,
schema: &'life2 str,
table: &'life3 str,
query_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Option<TableInfoRef>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn copy_in_table<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
catalog: &'life1 str,
schema: &'life2 str,
table: &'life3 str,
query_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Option<TableInfoRef>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolves the target table of a COPY and returns its metadata, or
None when the table does not exist. Implementations should also
enforce the write permission for the table here so unauthorized
copies fail before any data is transferred.
Sourcefn copy_in_insert<'life0, 'async_trait>(
&'life0 self,
requests: RowInsertRequests,
query_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn copy_in_insert<'life0, 'async_trait>(
&'life0 self,
requests: RowInsertRequests,
query_ctx: QueryContextRef,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts a parsed batch produced by a COPY stream. Returns the number of affected rows.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".