shape_ast/ast/
data_sources.rs1use serde::{Deserialize, Serialize};
4
5use super::expressions::Expr;
6use super::span::Span;
7use super::types::TypeAnnotation;
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
11pub struct DataSourceDecl {
12 pub name: String,
13 pub name_span: Span,
14 pub schema: TypeAnnotation,
16 pub provider_expr: Expr,
18}
19
20#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct QueryDecl {
23 pub name: String,
24 pub name_span: Span,
25 pub output_schema: TypeAnnotation,
27 pub params_schema: TypeAnnotation,
29 pub source_name: String,
31 pub sql: String,
33 pub sql_span: Span,
34}