feat(parser): implement insert command parsing

Implements the parse_insert_command function to handle the insert
statement according to the grammar definition. The function now
correctly parses the command format insert int string string and creates
a structured Statement::Insert with the id, username, and email fields.
This commit is contained in:
Khaïs COLIN 2025-05-31 16:08:42 +02:00
parent 315703d46b
commit 28cb288eaf
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
12 changed files with 228 additions and 20 deletions

View file

@ -235,6 +235,8 @@ i will use rustyline, since it seems like the most feature-complete
insert <id:int> <username:string> <email:string>
** TODO Row struct
** TODO parse row insert
** TODO separate statements with semicolons
** TODO in case of parse error, skip until next semicolon to better recover
** TODO serialize/deserialize row to/from raw bytes
*** TODO look for best practices for creating binary formats