CUBRID Engine  latest
PATH_TOKEN Struct Reference

#include <db_json_path.hpp>

Collaboration diagram for PATH_TOKEN:
Collaboration graph

Public Types

enum  token_type {
  object_key_wildcard, array_index_wildcard, double_wildcard, object_key,
  array_index, array_end_index
}
 

Public Member Functions

 PATH_TOKEN ()
 
 PATH_TOKEN (token_type type, unsigned long array_idx)
 
 PATH_TOKEN (token_type type, std::string &&s)
 
const std::string & get_object_key () const
 
unsigned long get_array_index () const
 
bool is_wildcard () const
 

Static Public Member Functions

static bool match_pattern (const PATH_TOKEN &matcher, const PATH_TOKEN &matchee)
 

Public Attributes

token_type m_type
 
std::string m_object_key
 
unsigned long m_array_idx
 

Detailed Description

Definition at line 34 of file db_json_path.hpp.

Member Enumeration Documentation

Enumerator
object_key_wildcard 
array_index_wildcard 
double_wildcard 
object_key 
array_index 
array_end_index 

Definition at line 36 of file db_json_path.hpp.

Constructor & Destructor Documentation

PATH_TOKEN::PATH_TOKEN ( )

Definition at line 614 of file db_json_path.cpp.

PATH_TOKEN::PATH_TOKEN ( token_type  type,
unsigned long  array_idx 
)

Definition at line 620 of file db_json_path.cpp.

PATH_TOKEN::PATH_TOKEN ( token_type  type,
std::string &&  s 
)

Definition at line 627 of file db_json_path.cpp.

Member Function Documentation

unsigned long PATH_TOKEN::get_array_index ( ) const

Definition at line 643 of file db_json_path.cpp.

References array_index, assert, m_array_idx, and m_type.

Referenced by db_json_array_insert_func(), JSON_PATH::erase(), JSON_PATH::extract_from_subtree(), JSON_PATH::is_last_array_index_less_than(), and match_pattern().

Here is the caller graph for this function:

const std::string & PATH_TOKEN::get_object_key ( ) const

Definition at line 635 of file db_json_path.cpp.

References assert, m_object_key, m_type, and object_key.

Referenced by JSON_PATH::erase(), JSON_PATH::extract_from_subtree(), and match_pattern().

Here is the caller graph for this function:

bool PATH_TOKEN::is_wildcard ( ) const

Definition at line 651 of file db_json_path.cpp.

References array_index_wildcard, double_wildcard, m_type, and object_key_wildcard.

Referenced by match_pattern().

Here is the caller graph for this function:

bool PATH_TOKEN::match_pattern ( const PATH_TOKEN matcher,
const PATH_TOKEN matchee 
)
static

Definition at line 657 of file db_json_path.cpp.

References array_index, array_index_wildcard, assert, double_wildcard, get_array_index(), get_object_key(), is_wildcard(), m_type, object_key, and object_key_wildcard.

Referenced by db_json_split_path_by_delimiters().

Here is the caller graph for this function:

Member Data Documentation

unsigned long PATH_TOKEN::m_array_idx

Definition at line 49 of file db_json_path.hpp.

Referenced by get_array_index().

std::string PATH_TOKEN::m_object_key

Definition at line 48 of file db_json_path.hpp.

Referenced by get_object_key().


The documentation for this struct was generated from the following files: