adamfowleruk / groundupdb

Creating a database from the ground up in C++ for fun!
Apache License 2.0
109 stars 25 forks source link

Add tests for most basic C++ data types #18

Closed adamfowleruk closed 3 years ago

adamfowleruk commented 3 years ago

Please start with a use case description for a USER of this work [Who] As an app developer [What] I need to store common app data in the KV store [Value] In order to store and retrieve necessary data for my application

Describe the solution you'd like

Describe alternatives you've considered Converting everything to a string - penalties there, and takes up disc space

Additional context None

adamfowleruk commented 3 years ago

feature-18 branch now has support for basic C++ types, and any non-keyed stl-like container types.

This is true for serialisation to Bytes (aka std::vector), but I've not yet got a way to lazily convert back to an EncodedValue with the unpacked C++ representation of the data.

Custom classes may want to define an operator groundupdb::EncodedValue() function, and MyType(EncodedValue& from) constructor. This idea needs validating though.