pub enum Response {
Show 16 variants
Hello {
protocol_version: u32,
kind: Kind,
name: String,
version: String,
capabilities: Vec<String>,
provides: Vec<PluginId>,
},
VersionMismatch {
min_version: u32,
max_version: u32,
},
Describe {
connection_fields: Vec<ConnectionField>,
option_fields: Vec<OptionField>,
identifier_quote: Option<String>,
string_literal: Option<String>,
message_limit: Option<u64>,
single_writer: Option<SingleWriter>,
},
Validated {
errors: Vec<String>,
warnings: Vec<String>,
},
Ok {},
Result {
columns: Vec<String>,
},
ResultEnd {
rows: u64,
},
NoResult {
rows_affected: Option<u64>,
},
Catalog {
catalog: Value,
},
NeedFonts {
font: FontRequest,
},
Written {
files: Vec<String>,
warnings: Vec<String>,
},
Delivered {
location: String,
attempts: Option<u32>,
},
Loaded {
relation: String,
rows: u64,
warning: Option<String>,
},
Error {
message: String,
kind: Option<String>,
code: Option<String>,
},
Log {
level: LogLevel,
message: String,
fields: Map<String, Value>,
},
Progress {
message: Option<String>,
done: Option<u64>,
total: Option<u64>,
},
}Expand description
Plugin → core.
Variants§
Hello
Fields
VersionMismatch
Describe
Fields
connection_fields: Vec<ConnectionField>option_fields: Vec<OptionField>identifier_quote: Option<String>Source: the character the database quotes identifiers with (" for DuckDB and
Postgres, a backtick for Databricks). Core uses it to quote names a project asks to
quote (a source’s quoting:). Every source sets it; other kinds leave it out.
string_literal: Option<String>Source: how core spells a string holding ' or \ when it writes one into SQL (an
inlined lookup): absent or chr for chr(39)/chr(92), backslash for \'/\\
inside the quotes (a database without chr(), such as ClickHouse).
message_limit: Option<u64>Destination advertising message: the most characters a message may have in the
service, after translation. Core shows it next to a message’s length in a preview.
single_writer: Option<SingleWriter>Source: a connection field naming a file only one process may write at a time
(DuckDB’s path). Core runs one Binding at a time on a connection that sets it,
whatever the entry’s threads:.
Validated
Every problem with the options, each a sentence naming the key; empty when they’re fine.
Fields
Ok
Result
A result set follows as Arrow frames, ended by result_end.
ResultEnd
NoResult
Catalog
A source’s catalogue, using the existing dre/catalog/v1 document shape.
NeedFonts
A format needs a pinned registry font before completing its write.
Fields
font: FontRequestWritten
Fields
Delivered
Fields
Loaded
relation is what SQL uses to read the loaded rows. warning, when set, is shown to the
user (e.g. the database has no bulk path, so a load this size is slow).
Error
The request failed. kind is one of ERROR_KINDS; code names the problem,
namespaced by the plugin (sftp/host-key-mismatch). Both are optional (protocol 0 has
neither): without a code, core reports the failure under its own code for the step;
a code without a kind counts as internal.
Log
Protocol 1: a log line, while a request runs (with its id) or between requests.
Fields
Progress
Protocol 1, optional: how far a long request has got. Core shows it when present.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Response
impl JsonSchema for Response
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more