OmniSciDB  7bf56492aa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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(), RelAlgDagBuilder::build(), anonymous_namespace{RelAlgDagBuilder.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(), details::RelAlgDispatcher::dispatchAggregate(), details::RelAlgDispatcher::dispatchFilter(), details::RelAlgDispatcher::dispatchJoin(), details::RelAlgDispatcher::dispatchLogicalValues(), details::RelAlgDispatcher::dispatchModify(), details::RelAlgDispatcher::dispatchProject(), details::RelAlgDispatcher::dispatchSort(), details::RelAlgDispatcher::dispatchTableFunction(), org.apache.calcite.sql2rel.SqlToRelConverter::distinctify(), ExtractExpr::generate(), DateTruncExpr::generate(), anonymous_namespace{RelAlgDagBuilder.cpp}::get_int_literal_field(), Importer_NS::DelimitedParserUtils::get_row(), ArrowResultSetConverter::getArrowResult(), org.apache.calcite.sql2rel.SqlToRelConverter::getCorrelationUse(), anonymous_namespace{ExpressionRange.cpp}::getDateTimePrecisionCastRange(), anonymous_namespace{RelAlgDagBuilder.cpp}::getFieldNamesFromScanNode(), details::RelAlgDispatcher::getRelAlgInputs(), anonymous_namespace{RelAlgDagBuilder.cpp}::getTableFromScanNode(), ArrowResultSetConverter::initializeColumnBuilder(), org.apache.calcite.sql2rel.SqlToRelConverter.Blackboard::lookupExp(), ArrowResultSetConverter::makeField(), msg_consume(), anonymous_namespace{RelAlgDagBuilder.cpp}::node_id(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_abstract_input(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_aggregate_expr(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_case(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_literal(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_nulls_position(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_operator(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_scalar_expr(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_sort_direction(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_subquery(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_type(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_window_bound(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_window_order_exprs(), details::RelAlgDispatcher::run(), QueryRunner::QueryRunner::runMultipleStatements(), 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
CHECK(cgen_state)

+ Here is the call graph for this function:

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

Definition at line 49 of file JsonAccessors.h.

References CHECK().

Referenced by details::RelAlgDispatcher::dispatchModify(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_aggregate_expr(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_literal(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_operator(), anonymous_namespace{RelAlgDagBuilder.cpp}::parse_type(), and anonymous_namespace{RelAlgDagBuilder.cpp}::parse_window_bound().

49  {
50  CHECK(obj.IsBool());
51  return obj.GetBool();
52 }
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 54 of file JsonAccessors.h.

References CHECK().

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

54  {
55  CHECK(obj.IsDouble());
56  return obj.GetDouble();
57 }
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 39 of file JsonAccessors.h.

References CHECK().

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

39  {
40  CHECK(obj.IsInt64());
41  return obj.GetInt64();
42 }
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: