pub fn parse_columns(
    sql: &str,
) -> Result<(Vec<ColumnDef<Raw>>, Vec<TableConstraint<Raw>>), ParserError> {
    let tokens = lexer::lex(sql)?;
    let mut parser = Parser::new(sql, tokens);
    let columns = parser.parse_columns(Optional)?;
    if parser.next_token().is_some() {
        parser_err!(parser, parser.peek_prev_pos(), "extra token after columns")
    } else {
        Ok(columns)
    }
}
/// Parses a SQL string containing zero or more SQL columns.
Parses a SQL string containing zero or more SQL columns.
Parses a SQL string containing zero or more SQL columns .
pub fn parse_columns(
    sql: &str,
) -> Result<(Vec<ColumnDef<Raw>>, Vec<TableConstraint<Raw>>), ParserError> {
    let tokens = lexer::lex(sql)?;
    let mut parser = Parser::new(sql, tokens);
    let columns = parser.parse_columns(Optional)?;
    if parser.next_token().is_some() {
        parser_err!(parser, parser.peek_prev_pos(), "extra token after columns")
    } else {
        Ok(columns)
    }
}
pub fn parse_columns ( sql : & str , ) -> Result < ( Vec < ColumnDef < Raw > > , Vec < TableConstraint < Raw > > ) , ParserError > { let tokens = lexer :: lex ( sql ) ? ; let mut parser = Parser :: new ( sql , tokens ) ; let columns = parser . parse_columns ( Optional ) ? ; if parser . next_token ( ) . is_some ( ) { parser_err ! ( parser parser peek_prev_pos ( ) " " ) } else { Ok ( columns ) } }
Parses a SQL string containing zero or more SQL columns.
Parses a SQL string containing zero or more SQL columns .
sql
&str
sql
&str