|
VSQLite++ 0.3
|
Helper for composing JSON path expressions compatible with SQLite's JSON1 dialect. More...
#include <json_fts.hpp>

Public Member Functions | |
| path_builder () | |
| Constructs a builder positioned at the JSON root ($). | |
| path_builder & | key (std::string_view segment) |
| Appends an object key to the path. | |
| path_builder & | index (std::size_t idx) |
| Appends an array index access to the path. | |
| std::string const & | str () const noexcept |
| Returns the current JSON path representation (e.g. $.user.name). | |
Private Attributes | |
| std::string | path_ |
Helper for composing JSON path expressions compatible with SQLite's JSON1 dialect.
Instances start at the root ($) and can be extended via key and index. The builder keeps the JSON path in UTF-8 form and automatically quotes segments that require escaping (spaces, punctuation, etc.).
Definition at line 58 of file json_fts.hpp.
| sqlite::v2::json::path_builder::path_builder | ( | ) |
| path_builder & sqlite::v2::json::path_builder::index | ( | std::size_t | idx | ) |
Appends an array index access to the path.
| idx | Zero-based array index to append. |
References path_builder().

| path_builder & sqlite::v2::json::path_builder::key | ( | std::string_view | segment | ) |
Appends an object key to the path.
The key is automatically quoted when it contains characters that need escaping.
| segment | Key to append. |
References path_builder().

|
inlinenoexcept |
Returns the current JSON path representation (e.g. $.user.name).
Definition at line 82 of file json_fts.hpp.
References path_.
|
private |
Definition at line 87 of file json_fts.hpp.
Referenced by str().