Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
Document.h File Reference
#include "Stroika/Foundation/StroikaPreComp.h"
#include "Stroika/Foundation/Characters/String.h"
#include "Stroika/Foundation/Containers/Mapping.h"
#include "Stroika/Foundation/DataExchange/VariantValue.h"
#include "Document.inl"

Go to the source code of this file.

Namespaces

namespace  Stroika::Foundation
 

Typedefs

using Stroika::Foundation::Database::Document::Document = Mapping< String, VariantValue >
 
using Stroika::Foundation::Database::Document::IDType = String
 

Variables

static const String Stroika::Foundation::Database::Document::kID = "id"sv
 

Detailed Description

Note
Code-Status: Alpha

Definition in file Document.h.

Typedef Documentation

◆ Document

using Stroika::Foundation::Database::Document::Document = typedef Mapping<String, VariantValue>

In a document database, a document is a mapping of field names to values (slightly different than just a VariantValue)

Definition at line 28 of file Document.h.

◆ IDType

'Type' used for value of 'id' field.

Note
- we considered using GUID, but String is more flexible given that different systems (e.g. XML, MongoDB etc) all might have different requirements on how to format/size/rules for those IDs. String is lingua-franca.

Definition at line 36 of file Document.h.

Variable Documentation

◆ kID

const String Stroika::Foundation::Database::Document::kID = "id"sv
static
Note
this special value kID is used to identify the ID field in a document. Its value is "_id" (in mongodb, but in this API, its "id")
dont want to hardwire queer choice of mongodb, but dont want to have todo a lot of needless mapping/translation later.
the VALUE associated with this key is of type IDType.

Definition at line 44 of file Document.h.