Commit graph

6 commits

Author SHA1 Message Date
Timothy Flynn
6d3f68cc11 LibSQL: Store a NonnullRefPtr to the table definition in SQL::Row
Also return a direct reference to the table from its getter.
2022-11-30 11:43:13 +01:00
Timothy Flynn
5336f23c7e LibSQL: Remove unused SQL::Row constructors/methods 2022-11-30 11:43:13 +01:00
Timothy Flynn
c3a6fad080 LibSQL: Rename Row::next_pointer setter to Row::set_next_pointer 2022-11-30 11:43:13 +01:00
Ben Wiederhake
9d89b64d59 LibSQL: Resolve cyclic dependency
Previously, class SQL::Key
depends on def class SQL::IndexDef (because inline def index())
depends on def class SQL::KeyPartDef (inline def key_definition())
depends on def class SQL::ColumnDef (because base class)
depends on def class SQL::Relation (because base class)
depends on def class SQL::Key (because inline def hash()).

This hasn't caused any problems so far because Meta.h happened to be
always included after Key.h (in part due to alphabetical ordering).

However, a compilation that for example only contains
    #include <Userland/Libraries/LibSQL/Key.h>
would fail to compile.

This patch resolves this issue by pushing the inline definition of
SQL::Relation::hash() into a different file. Yes, this might reduce
performance marginally, but this gets it to compile again.
2021-10-06 23:52:40 +01:00
Jan de Visser
85a84b0794 LibSQL: Introduce Serializer as a mediator between Heap and client code
Classes reading and writing to the data heap would communicate directly
with the Heap object, and transfer ByteBuffers back and forth with it.
This makes things like caching and locking hard. Therefore all data
persistence activity will be funneled through a Serializer object which
in turn submits it to the Heap.

Introducing this unfortunately resulted in a huge amount of churn, in
which a number of smaller refactorings got caught up as well.
2021-08-21 22:03:30 +02:00
Jan de Visser
87bd69559f LibSQL: Database layer
This patch implements the beginnings of a database API allowing for the
creation of tables, inserting rows in those tables, and retrieving those
rows.
2021-06-19 22:06:45 +02:00