ladybird/Tests/LibSQL
Jan de Visser d074a601df LibSQL+SQLServer: Bare bones INSERT and SELECT statements
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.
2021-08-21 22:03:30 +02:00
..
CMakeLists.txt LibSQL+SQLServer: Build SQLServer system service 2021-07-08 17:55:59 +04:30
TestSqlBtreeIndex.cpp LibSQL: Make TupleDescriptor a shared pointer instead of a stack object 2021-08-21 22:03:30 +02:00
TestSqlDatabase.cpp LibSQL: Redesign Value implementation and add new types 2021-08-21 22:03:30 +02:00
TestSqlExpressionParser.cpp LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
TestSqlHashIndex.cpp LibSQL: Make TupleDescriptor a shared pointer instead of a stack object 2021-08-21 22:03:30 +02:00
TestSqlStatementExecution.cpp LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
TestSqlStatementParser.cpp LibSQL: Move Order and Nulls enums from SQL::AST to SQL namespace 2021-07-08 17:55:59 +04:30
TestSqlValueAndTuple.cpp LibSQL: Redesign Value implementation and add new types 2021-08-21 22:03:30 +02:00