Capture a raw SQL statement until the next semicolon. Used for DML (INSERT/UPDATE/DELETE) as well as NodeDB SQL extensions (PUBLISH TO, etc.) that start with an identifier token.
(tokens: &[Token], pos: &mut usize)
| 252 | /// Used for DML (INSERT/UPDATE/DELETE) as well as NodeDB SQL extensions |
| 253 | /// (PUBLISH TO, etc.) that start with an identifier token. |
| 254 | fn parse_sql(tokens: &[Token], pos: &mut usize) -> Result<Statement, ProceduralError> { |
| 255 | let sql = collect_raw_sql_until(tokens, pos, &[Token::Semicolon]); |
| 256 | skip_if(tokens, pos, &Token::Semicolon); |
| 257 | Ok(Statement::Sql { sql }) |
| 258 | } |
| 259 | |
| 260 | /// ROLLBACK [TO [SAVEPOINT] <name>] |
| 261 | fn parse_rollback(tokens: &[Token], pos: &mut usize) -> Result<Statement, ProceduralError> { |
no test coverage detected