feat: support multiline SQL input in obclient #<573>
What problem were solved in this pull request?
Previously, obclient did not support multi-line SQL input. When users entered a statement that spanned multiple lines (e.g., CREATE TABLE), the client failed to parse it and returned an error.
Issue Number: close #573
What is changed and how it works?
Enhanced the client input handling logic to buffer input until a terminating semicolon (;) is received. Modified the prompt to match MySQL-style continuation (->) for multi-line queries. Now, users can input SQL statements across multiple lines, and the client will execute them only when complete.
Example before:
miniob > create table t( SQL_SYNTAX > Failed to parse sql
Example after:
miniob > create table t( -> a int, -> b int); SUCCESS
Other information
Tested with CREATE TABLE both single-line and multi-line.
Thanks for your contribution. I left some issues, if you have any questions, please feel free to ask.