Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

neodb

29 views
Skip to first unread message

Mr Flibble

unread,
Jan 24, 2021, 11:50:42 AM1/24/21
to
Hi!

Making a C++ RDBMS, "neodb", that will be used by neoGFX:

// todo: use gtest
#include <neodb/file_database.hpp>
#include <neodb/memory_database.hpp>

using namespace neodb;

void test_file_database()
{
file_database database{ "/tmp/accounts.db" };

create_table<primary_key<string>>(
database,
"Companies"_s,
"Company Name"_s);

typedef int32_t currency;

create_table<primary_key<int32_t>, foreign_key<string>, currency>(
database,
"Invoices"_s,
"Invoice Number"_s,
as_foreign_key<string>{ "Company Name"_s, "Companies"_s, "Company Name"_s },
"Total"_s );
}

void test_memory_database()
{
memory_database database{ "Players"_s };

typedef int64_t score;

create_table<primary_key<string>, score>(
database,
"High Scores"_s,
"Player Name"_s,
"Score"_s);
}

Message ends.

/Flibble

--
😎

Öö Tiib

unread,
Jan 29, 2021, 2:52:21 PM1/29/21
to
On Sunday, 24 January 2021 at 18:50:42 UTC+2, Mr Flibble wrote:
> Hi!
>
> Making a C++ RDBMS, "neodb", that will be used by neoGFX:

Better integrate/wrap some existing engine like SQLite In-
Memory.

Mr Flibble

unread,
Jan 29, 2021, 5:25:43 PM1/29/21
to
No. I am making my own.

/Flibble

--
😎

Chris M. Thomasson

unread,
Jan 29, 2021, 5:41:13 PM1/29/21
to
Nice! Is this multi-process? If so, how are you dealing with process
failures in the middle of a db transaction?

Mr Flibble

unread,
Jan 29, 2021, 6:09:43 PM1/29/21
to
ACID.

/Flibble

--
😎

Chris M. Thomasson

unread,
Jan 29, 2021, 6:40:46 PM1/29/21
to
That works. Cool.


0 new messages