Skip to content

Commit

Permalink
LibSQL: Rewrite the SQL::Value type to be contained within one class
Browse files Browse the repository at this point in the history
Currently, the Value class is essentially a "pImpl" wrapper around the
ValueImpl hierarchy of classes. This is a bit difficult to follow and
reason about, as methods jump between the Value class and its impl
classes.

This changes the Variant held by Value to instead store the specified
types (String, int, etc.) directly. In doing so, the ValueImpl classes
are removed, and all methods are now just concise Variant visitors.

As part of this rewrite, support for the "array" type is dropped (or
rather, just not re-implemented) as it was unused. If it's needed in the
future, support can be re-added.

This does retain the ability for non-NULL types to store NULL values
(i.e. an empty Optional). I tried dropping this support as well, but it
is depended upon by the on-disk storage classes in non-trivial ways.
  • Loading branch information
trflynn89 committed Sep 23, 2022
1 parent a898207 commit 28c7f92
Show file tree
Hide file tree
Showing 7 changed files with 591 additions and 1,363 deletions.

0 comments on commit 28c7f92

Please sign in to comment.