Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
json.cpp File Reference
#include "joedb/ui/json.h"
#include "joedb/ui/type_io.h"
#include "joedb/ui/base64.h"
#include "joedb/Readable.h"
#include "joedb/error/Exception.h"
#include <iostream>
#include <cmath>
#include <vector>
#include "joedb/TYPE_MACRO.h"
Include dependency graph for json.cpp:

Go to the source code of this file.

Namespaces

namespace  joedb
 

Macros

#define TYPE_MACRO(type, return_type, type_id, R, W)
 
#define TYPE_MACRO_NO_REFERENCE
 
#define TYPE_MACRO_NO_STRING
 
#define TYPE_MACRO_NO_BLOB
 
#define TYPE_MACRO_NO_INT
 
#define TYPE_MACRO(type, return_type, type_id, R, W)
 
#define TYPE_MACRO_NO_REFERENCE
 
#define TYPE_MACRO_NO_STRING
 
#define TYPE_MACRO_NO_BLOB
 
#define TYPE_MACRO_NO_FLOAT
 

Functions

int joedb::write_json (std::ostream &out, const Readable &db, bool base64)
 
int joedb::write_json_string (std::ostream &out, const std::string &s, bool base64)
 

Macro Definition Documentation

◆ TYPE_MACRO [1/2]

#define TYPE_MACRO (   type,
  return_type,
  type_id,
  R,
 
)
Value:
case Type::Type_Id::type_id:\
{\
const auto x = db.get_##type_id(tid, record_id, fid);\
if (std::isnan(x) || std::isinf(x))\
{\
out << '0';\
result |= JSON_Error::infnan;\
}\
else\
write_##type_id(out, x);\
}\
break;

◆ TYPE_MACRO [2/2]

#define TYPE_MACRO (   type,
  return_type,
  type_id,
  R,
 
)
Value:
case Type::Type_Id::type_id:\
{\
const auto x = db.get_##type_id(tid, record_id, fid);\
write_##type_id(out, x);\
}\
break;

◆ TYPE_MACRO_NO_BLOB [1/2]

#define TYPE_MACRO_NO_BLOB

◆ TYPE_MACRO_NO_BLOB [2/2]

#define TYPE_MACRO_NO_BLOB

◆ TYPE_MACRO_NO_FLOAT

#define TYPE_MACRO_NO_FLOAT

◆ TYPE_MACRO_NO_INT

#define TYPE_MACRO_NO_INT

◆ TYPE_MACRO_NO_REFERENCE [1/2]

#define TYPE_MACRO_NO_REFERENCE

◆ TYPE_MACRO_NO_REFERENCE [2/2]

#define TYPE_MACRO_NO_REFERENCE

◆ TYPE_MACRO_NO_STRING [1/2]

#define TYPE_MACRO_NO_STRING

◆ TYPE_MACRO_NO_STRING [2/2]

#define TYPE_MACRO_NO_STRING