uqa_sql/schema/
declarations.rs1use crate::{
10 ast::{ColumnDef, FunctionVolatility},
11 SQLError,
12};
13use crate::{expr::EngineHook, semantics::sets::SetFunctionCatalog};
14
15pub trait SchemaExpressionCatalog:
17 EngineHook + SetFunctionCatalog + super::dependencies::oid_alias::OidAliasInput
18{
19 fn plan_schema_expression(
21 &self,
22 expression: &crate::ast::Expr,
23 columns: &[ColumnDef],
24 ) -> Result<super::expressions::PlannedSchemaExpression, SQLError>;
25 fn registered_runtime_function_volatility(&self, name: &str) -> Option<FunctionVolatility>;
26 fn schema_expression_columns(&self, table: &str) -> Result<Option<Vec<ColumnDef>>, SQLError>;
27}
28
29pub struct SchemaBindingContext<'a, 'q> {
31 pub catalog: &'a dyn SchemaExpressionCatalog,
32 pub binding: &'a crate::binding::context::BindingContext<'q>,
33}