mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
d074a601df
This patch provides very basic, bare bones implementations of the INSERT and SELECT statements. They are *very* limited: - The only variant of the INSERT statement that currently works is SELECT INTO schema.table (column1, column2, ....) VALUES (value11, value21, ...), (value12, value22, ...), ... where the values are literals. - The SELECT statement is even more limited, and is only provided to allow verification of the INSERT statement. The only form implemented is: SELECT * FROM schema.table These statements required a bit of change in the Statement::execute API. Originally execute only received a Database object as parameter. This is not enough; we now pass an ExecutionContext object which contains the Database, the current result set, and the last Tuple read from the database. This object will undoubtedly evolve over time. This API change dragged SQLServer::SQLStatement into the patch. Another API addition is Expression::evaluate. This method is, unsurprisingly, used to evaluate expressions, like the values in the INSERT statement. Finally, a new test file is added: TestSqlStatementExecution, which tests the currently implemented statements. As the number and flavour of implemented statements grows, this test file will probably have to be restructured. |
||
---|---|---|
.. | ||
AK | ||
Kernel | ||
LibC | ||
LibCompress | ||
LibCore | ||
LibCpp | ||
LibCrypto | ||
LibELF | ||
LibGfx | ||
LibIMAP | ||
LibJS | ||
LibM | ||
LibPthread | ||
LibRegex | ||
LibSQL | ||
LibThreading | ||
LibTLS | ||
LibUnicode | ||
LibWasm | ||
LibWeb | ||
UserspaceEmulator | ||
CMakeLists.txt |