pub fn parse_cast_expression(&mut self) -> Result<ASTNode, ParserError> {
        self.consume_token(&Token::LParen)?;
        let expr = self.parse_expr(0)?;
        self.consume_token(&Token::Keyword("AS".to_string()))?;
        let data_type = self.parse_data_type()?;
        self.consume_token(&Token::RParen)?;
        Ok(ASTNode::SQLCast {
            expr: Box::new(expr),
            data_type,
        })
    }
/// Parse a SQL CAST function e.g. `CAST(expr AS FLOAT)`
Parse a SQL CAST function e.g.
Parse a SQL CAST function e . g .
pub fn parse_cast_expression(&mut self) -> Result<ASTNode, ParserError> {
        self.consume_token(&Token::LParen)?;
        let expr = self.parse_expr(0)?;
        self.consume_token(&Token::Keyword("AS".to_string()))?;
        let data_type = self.parse_data_type()?;
        self.consume_token(&Token::RParen)?;
        Ok(ASTNode::SQLCast {
            expr: Box::new(expr),
            data_type,
        })
    }
pub fn parse_cast_expression ( & mut self ) -> Result < ASTNode , ParserError > { self . consume_token ( & Token :: LParen ) ? ; let expr = self . parse_expr ( 0 ) ? ; self . consume_token ( & Token :: Keyword ( " " . to_string ( ) ) ) ? ; let data_type = self . parse_data_type ( ) ? ; self . consume_token ( & Token :: RParen ) ? ; Ok ( ASTNode :: SQLCast { expr : Box :: new ( expr ) , data_type , } ) }
Parse a SQL CAST function e.g.
Parse a SQL CAST function e . g .
&mut self
&mut self