Returns the inner `Column` if any. This is a specialized version of [`Self::try_as_col`] that take Cast expressions into account when the expression is as on condition for joins. Called this method when you are sure that the expression is a `Column` or a `Cast` expression that wraps a `Column`.
(&self)
| 2033 | /// Called this method when you are sure that the expression is a `Column` |
| 2034 | /// or a `Cast` expression that wraps a `Column`. |
| 2035 | pub fn get_as_join_column(&self) -> Option<&Column> { |
| 2036 | match self { |
| 2037 | Expr::Column(c) => Some(c), |
| 2038 | Expr::Cast(Cast { expr, .. }) => match &**expr { |
| 2039 | Expr::Column(c) => Some(c), |
| 2040 | _ => None, |
| 2041 | }, |
| 2042 | _ => None, |
| 2043 | } |
| 2044 | } |
| 2045 | |
| 2046 | /// Return all references to columns in this expression. |
| 2047 | /// |