Looking into the library code a bit more, I realised I just need to use the
C4Database subclass.
On Sunday, 27 May 2018 10:07:55 UTC+1, Adam Wilson wrote:
>
> I'm using LiteCoreStatic lib in a C++ project, and hit this compilation
> error:
>
> 'c4Internal::Database' has protected destructor
>
> My sample code:
>
> #include "Database.hh"
>
> static const C4DatabaseConfig kDBConfig = {
> .flags = (kC4DB_Create | kC4DB_AutoCompact | kC4DB_SharedKeys),
> .storageEngine = kC4SQLiteStorageEngine,
> .versioning = kC4RevisionTrees,
> };
>
>
>
> //==
> int main (int argc, char* argv[])
> {
> Database db ("./c4db/db", kDBConfig);
>
> db.putRawDocument("test", slice("myKey"), slice(""),
> slice("goldenRatio") );
>
> Record record = db.getRawDocument("test", slice("myKey"));
> std::cout << record.key().asString() << ":" <<
> record.body().asString();
> }
>
> Should I be instantiating the Database class differently?
>
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/fef372e4-87c6-4055-bd68-48c559261047%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.