pub struct LookupFile {
pub columns: Option<Located<Loose<Map<Loose<ColumnType>>>>>,
pub sheet: Option<Located<Loose<String>>>,
pub load: Option<Located<Loose<LoadName>>>,
pub rows: Option<Located<Value>>,
pub unknown: UnknownKeys,
}Expand description
The optional config of a lookup, lookups/<name>.yml next to a csv, xlsx, xls, json or jsonl file. (A .yml lookup that holds the rows themselves can also set rows.)
Fields§
§columns: Option<Located<Loose<Map<Loose<ColumnType>>>>>Types for columns; without it every value is text.
sheet: Option<Located<Loose<String>>>For xlsx and xls lookups: the sheet to read. Default: the first.
load: Option<Located<Loose<LoadName>>>How the lookup reaches the database: inlined into the SQL, loaded into a temp table, or chosen by size (auto).
rows: Option<Located<Value>>For a .yml lookup that holds its own data: the rows.
unknown: UnknownKeysTrait Implementations§
Source§impl<'de> Deserialize<'de> for LookupFile
impl<'de> Deserialize<'de> for LookupFile
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for LookupFile
impl JsonSchema for LookupFile
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for LookupFile
impl RefUnwindSafe for LookupFile
impl Send for LookupFile
impl Sync for LookupFile
impl Unpin for LookupFile
impl UnsafeUnpin for LookupFile
impl UnwindSafe for LookupFile
Blanket Implementations§
impl<T> Allocation for T
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