1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
mod spring_source_row_builder;
pub use spring_source_row_builder::SpringSourceRowBuilder;
use crate::{
api::error::Result,
stream_engine::autonomous_executor::{SchemalessRow, SourceRow},
};
#[derive(Clone, Debug)]
pub struct SpringSourceRow(SourceRow);
impl SpringSourceRow {
pub(crate) fn new(source_row: SchemalessRow) -> Self {
let source_row = SourceRow::Raw(source_row);
Self(source_row)
}
pub fn from_json(json: &str) -> Result<Self> {
let source_row = SourceRow::from_json(json)?;
Ok(Self(source_row))
}
pub(crate) fn into_schemaless_row(self) -> Result<SchemalessRow> {
self.0.try_into()
}
}