Cthulhu  0.2.10
Cthulhu compiler collection
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
query.c File Reference
#include "json/query.h"
#include "json/json.h"
#include "base/panic.h"
#include "arena/arena.h"
#include "std/typed/vector.h"
#include "std/vector.h"
#include "io/io.h"
#include "interop/compile.h"
#include "notify/notify.h"
#include "cthulhu/events/events.h"
#include "query_scan.h"
#include "query_bison.h"
#include "query_flex.h"
Include dependency graph for query.c:

Go to the source code of this file.

Functions

 CT_CALLBACKS (kQueryCallbacks, query)
 
STA_DECL json_tjson_query (json_t *json, const char *query, logger_t *logger, arena_t *arena)
 query a json object More...
 
STA_DECL json_tjson_query_type (json_t *json, const char *query, json_kind_t kind, logger_t *logger, arena_t *arena)
 query a json object and ensure it is of a specific type More...
 

Function Documentation

◆ CT_CALLBACKS()

CT_CALLBACKS ( kQueryCallbacks  ,
query   
)

◆ json_query()

STA_DECL json_t* json_query ( json_t json,
const char *  query,
logger_t logger,
arena_t arena 
)

query a json object

Parameters
jsonthe object to query
querythe query to perform
loggerthe logger to use
arenathe arena to use
Returns
the result of the query

Definition at line 109 of file query.c.

◆ json_query_type()

STA_DECL json_t* json_query_type ( json_t json,
const char *  query,
json_kind_t  kind,
logger_t logger,
arena_t arena 
)

query a json object and ensure it is of a specific type

Parameters
jsonthe object to query
querythe query to perform
kindthe kind of json value to expect
loggerthe logger to use
arenathe arena to use
Returns
the result of the query

Definition at line 115 of file query.c.