OmniSciDB  5ade3759e0
JsonAccessors.h File Reference
#include <rapidjson/document.h>
#include "Shared/Logger.h"
+ Include dependency graph for JsonAccessors.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const rapidjson::Value & field (const rapidjson::Value &obj, const char field[]) noexcept
 
const int64_t json_i64 (const rapidjson::Value &obj) noexcept
 
const std::string json_str (const rapidjson::Value &obj) noexcept
 
const bool json_bool (const rapidjson::Value &obj) noexcept
 
const double json_double (const rapidjson::Value &obj) noexcept
 

Function Documentation

◆ field()

const rapidjson::Value& field ( const rapidjson::Value &  obj,
const char  field[] 
)
inlinenoexcept

Definition at line 31 of file JsonAccessors.h.

References CHECK.

Referenced by ExtensionFunctionsWhitelist::addCommon(), org.apache.calcite.sql2rel.SqlToRelConverter::adjustInputRef(), ArrowResultSet::ArrowResultSet(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::check_empty_inputs_field(), org.apache.calcite.sql2rel.SqlToRelConverter::collectInsertTargets(), org.apache.calcite.sql2rel.SqlToRelConverter::convertColumnList(), org.apache.calcite.sql2rel.SqlToRelConverter::convertLiteralInValuesList(), org.apache.calcite.sql2rel.SqlToRelConverter::convertMerge(), org.apache.calcite.sql2rel.SqlToRelConverter::convertUpdate(), org.apache.calcite.sql2rel.SqlToRelConverter::convertUsing(), org.apache.calcite.sql2rel.SqlToRelConverter::createSource(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchAggregate(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchFilter(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchJoin(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchLogicalValues(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchModify(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchNodes(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchProject(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchSort(), org.apache.calcite.sql2rel.SqlToRelConverter::distinctify(), ExtractExpr::generate(), DateTruncExpr::generate(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::get_int_literal_field(), anonymous_namespace{CalciteAdapter.cpp}::get_op_name(), Importer_NS::get_row(), org.apache.calcite.sql2rel.SqlToRelConverter::getCorrelationUse(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::getFieldNamesFromScanNode(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::getRelAlgInputs(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::getTableFromScanNode(), ArrowResultSetConverter::initializeColumnBuilder(), org.apache.calcite.sql2rel.SqlToRelConverter.Blackboard::lookupExp(), ArrowResultSetConverter::makeField(), msg_consume(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::node_id(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_abstract_input(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_aggregate_expr(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_case(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_literal(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_nulls_position(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_operator(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_scalar_expr(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_sort_direction(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_subquery(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_type(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_window_bound(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_window_order_exprs(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::run(), QueryRunner::QueryRunner::runMultipleStatements(), stream_insert(), anonymous_namespace{StreamInsert.cpp}::stream_insert(), com.omnisci.jdbc.OmniSciDatabaseMetaData::tablePermProcess(), org.apache.calcite.rel.externalize.MapDRelJson::toFieldCollation(), org.apache.calcite.rel.externalize.MapDRelJson::toJson(), org.apache.calcite.rel.externalize.MapDRelJson::toRex(), RelAlgTranslator::translateDateadd(), RelAlgTranslator::translateDatediff(), and anonymous_namespace{ArrowResultSet.cpp}::type_from_arrow_field().

32  {
33  CHECK(obj.IsObject());
34  const auto field_it = obj.FindMember(field);
35  CHECK(field_it != obj.MemberEnd());
36  return field_it->value;
37 }
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
#define CHECK(condition)
Definition: Logger.h:187

◆ json_bool()

const bool json_bool ( const rapidjson::Value &  obj)
inlinenoexcept

◆ json_double()

const double json_double ( const rapidjson::Value &  obj)
inlinenoexcept

Definition at line 54 of file JsonAccessors.h.

References CHECK.

Referenced by anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_literal().

54  {
55  CHECK(obj.IsDouble());
56  return obj.GetDouble();
57 }
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

◆ json_i64()

const int64_t json_i64 ( const rapidjson::Value &  obj)
inlinenoexcept

Definition at line 39 of file JsonAccessors.h.

References CHECK.

Referenced by anonymous_namespace{RelAlgAbstractInterpreter.cpp}::RelAlgAbstractInterpreter::dispatchSort(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_abstract_input(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_literal(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_type(), and anonymous_namespace{RelAlgAbstractInterpreter.cpp}::parse_window_bound().

39  {
40  CHECK(obj.IsInt64());
41  return obj.GetInt64();
42 }
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

◆ json_str()