Skip to main content

nodedb_sql/planner/array_fn/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! Planner for `ARRAY_*` table-valued / scalar functions.
4//!
5//! The functions live in two AST shapes:
6//!
7//! * **Read** (`ARRAY_SLICE`, `ARRAY_PROJECT`, `ARRAY_AGG`,
8//!   `ARRAY_ELEMENTWISE`) — `SELECT * FROM array_xxx(...)`. Parsed
9//!   by sqlparser as `TableFactor::Table { name, args: Some(_), .. }`
10//!   (Postgres-style table-valued function). [`try_plan_array_table_fn`]
11//!   intercepts these before catalog resolution.
12//! * **Maintenance** (`ARRAY_FLUSH`, `ARRAY_COMPACT`) — bare
13//!   `SELECT array_flush(name)` with no FROM clause.
14//!   [`try_plan_array_maint_fn`] intercepts these from the constant-
15//!   query path.
16
17mod helpers;
18mod maint_fn;
19mod table_fn;
20
21#[cfg(test)]
22mod tests;
23
24pub use maint_fn::try_plan_array_maint_fn;
25pub use table_fn::try_plan_array_table_fn;