|
OXY API 1.0
OXY API Library Documentation
|
Configuration structure for SQL database interactions. More...
#include <sql_generator.hpp>
Public Attributes | |
| std::unordered_set< std::string > | array_field_names {} |
| std::unordered_set< std::string > | array_fields {} |
| Names of fields that are JSON arrays (e.g., "tags"). Others are treated as scalars. | |
| bool | array_fields {false} |
| std::string | column = "data" |
| std::unordered_set< std::string > | datetime_field_names {} |
| SqlDialect | dialect {SqlDialect::SQLite} |
| bool | postgres_cast_to_jsonb = true |
| PostgreSQL-specific: if your column is "json" not "jsonb", we will cast to jsonb anyway. | |
| std::string | table = "" |
Configuration structure for SQL database interactions.
Configuration for SQL generation behavior.
This structure holds configuration settings for SQL database interactions, including the SQL dialect, table name, column name, and specific settings for handling JSON fields. It allows for customization of SQL queries based on the database dialect and the structure of the data.
Members controlling structure and typing:
| std::unordered_set<std::string> oxy::core::metadata::SqlConfig::array_field_names {} |
Specific dotted field names treated as arrays.
| bool oxy::core::metadata::SqlConfig::array_fields {false} |
Treat all fields as arrays if true.
| std::string oxy::core::metadata::SqlConfig::column = "data" |
JSON column name; empty => plain columns.
| std::unordered_set<std::string> oxy::core::metadata::SqlConfig::datetime_field_names {} |
Dotted names to be treated as ISO 8601 datetime text. Example: {"createdAt", "user.updated_at"}
Comparisons use dialect-specific conversions for Eq/Ne/Lt/Le/Gt/Ge:
| SqlDialect oxy::core::metadata::SqlConfig::dialect {SqlDialect::SQLite} |
SQL dialect selection.
| bool oxy::core::metadata::SqlConfig::postgres_cast_to_jsonb = true |
PostgreSQL-specific: if your column is "json" not "jsonb", we will cast to jsonb anyway.
Cast column to jsonb prior to path navigation.
| std::string oxy::core::metadata::SqlConfig::table = "" |
Default table name for SELECT helpers.