lance_namespace_reqwest_client/models/merge_insert_into_table_request.rs
1/*
2 * Lance Namespace Specification
3 *
4 * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lancedb.github.io/lance-namespace/spec/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lancedb.github.io/lance-namespace/spec/impls/rest for more details.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// MergeInsertIntoTableRequest : Request for merging or inserting records into a table, excluding the Arrow IPC stream.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MergeInsertIntoTableRequest {
17 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18 pub id: Option<Vec<String>>,
19 /// Column name to use for matching rows (required)
20 #[serde(rename = "on", skip_serializing_if = "Option::is_none")]
21 pub on: Option<String>,
22 /// Update all columns when rows match
23 #[serde(rename = "when_matched_update_all", skip_serializing_if = "Option::is_none")]
24 pub when_matched_update_all: Option<bool>,
25 /// The row is updated (similar to UpdateAll) only for rows where the SQL expression evaluates to true
26 #[serde(rename = "when_matched_update_all_filt", skip_serializing_if = "Option::is_none")]
27 pub when_matched_update_all_filt: Option<String>,
28 /// Insert all columns when rows don't match
29 #[serde(rename = "when_not_matched_insert_all", skip_serializing_if = "Option::is_none")]
30 pub when_not_matched_insert_all: Option<bool>,
31 /// Delete all rows from target table that don't match a row in the source table
32 #[serde(rename = "when_not_matched_by_source_delete", skip_serializing_if = "Option::is_none")]
33 pub when_not_matched_by_source_delete: Option<bool>,
34 /// Delete rows from the target table if there is no match AND the SQL expression evaluates to true
35 #[serde(rename = "when_not_matched_by_source_delete_filt", skip_serializing_if = "Option::is_none")]
36 pub when_not_matched_by_source_delete_filt: Option<String>,
37}
38
39impl MergeInsertIntoTableRequest {
40 /// Request for merging or inserting records into a table, excluding the Arrow IPC stream.
41 pub fn new() -> MergeInsertIntoTableRequest {
42 MergeInsertIntoTableRequest {
43 id: None,
44 on: None,
45 when_matched_update_all: None,
46 when_matched_update_all_filt: None,
47 when_not_matched_insert_all: None,
48 when_not_matched_by_source_delete: None,
49 when_not_matched_by_source_delete_filt: None,
50 }
51 }
52}
53