示例#1
0
static inline TRI_json_t* GetRowProtoType (TRI_aql_explain_t* const explain,
                                           const TRI_aql_node_type_e type) {
  TRI_json_t* row;

  row = TRI_CreateArrayJson(TRI_UNKNOWN_MEM_ZONE);

  if (row == NULL) {
    return NULL;
  }

  TRI_Insert3ArrayJson(TRI_UNKNOWN_MEM_ZONE,
                       row,
                       "id",
                       TRI_CreateNumberJson(TRI_UNKNOWN_MEM_ZONE, (double) ++explain->_count));

  TRI_Insert3ArrayJson(TRI_UNKNOWN_MEM_ZONE,
                       row,
                       "loopLevel",
                       TRI_CreateNumberJson(TRI_UNKNOWN_MEM_ZONE, (double) explain->_level));

  TRI_Insert3ArrayJson(TRI_UNKNOWN_MEM_ZONE,
                       row,
                       "type",
                       TRI_CreateStringCopyJson(TRI_UNKNOWN_MEM_ZONE, TRI_NodeNameAql(type)));

  return row;
}
static void PrintType (TRI_aql_dump_t* const state, const TRI_aql_node_type_e type) {
  PrintIndent(state);
  printf("%s\n", TRI_NodeNameAql(type));
}