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