Skip to main content

uqa_sql/plan/
projection.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7/// Identity assigned to one projection result. SQL columns participate in
8/// ordinary name binding and wildcard expansion; internal attributes are
9/// executor-only `resjunk` slots addressed structurally.
10#[derive(Debug, Clone, PartialEq, Eq, Hash)]
11pub enum ProjectionTarget {
12    Column(String),
13    Internal(crate::ast::InternalColumnRef),
14}
15
16impl From<String> for ProjectionTarget {
17    fn from(value: String) -> Self {
18        Self::Column(value)
19    }
20}
21
22impl From<&str> for ProjectionTarget {
23    fn from(value: &str) -> Self {
24        Self::Column(value.to_string())
25    }
26}