Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_json_runtime_ops.c File Reference
#include "native_json_runtime_ops.h"
#include "native_yyjson_helpers.h"
#include "native_support.h"
#include "native_fs.h"
#include "native_app_config.h"
#include "native_json_config.h"
#include "native_process_capture.h"
#include "native_dynamic_multipart.h"
#include "native_dynamic_media.h"
#include "native_dynamic_request_fields.h"
#include "native_dynamic_template.h"
#include "native_dynamic_config.h"
#include "native_dynamic_relational.h"
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <sqlite3.h>
#include <dlfcn.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  NativeJsonCommandDispatchEntry
struct  TextBufferRuntime
struct  SqliteCaptureRuntime
struct  DynamicPostgresqlRuntimeConfig
 Carries resolved PostgreSQL runtime connection settings for native relational bridge commands. More...
struct  NativeLibpqApi
struct  business_admin_service_runtime
struct  business_admin_service_list_runtime
struct  json_value_list_runtime
struct  event_stream_row_runtime
struct  event_stream_row_list_runtime
struct  generated_surface_order_item_runtime

Macros

#define PHAROS_CONN_STATUS_OK_RUNTIME   0
#define PHAROS_PGRES_COMMAND_OK_RUNTIME   1
#define PHAROS_PGRES_TUPLES_OK_RUNTIME   2
#define PHAROS_PGRES_SINGLE_TUPLE_RUNTIME   9

Typedefs

typedef int(* NativeJsonCommandHandlerFn) (int argc, char **argv)
typedef struct DynamicPostgresqlRuntimeConfig DynamicPostgresqlRuntimeConfig
 Carries resolved PostgreSQL runtime connection settings for native relational bridge commands.

Enumerations

enum  TemplatePlaceholderKindRuntime { TEMPLATE_PLACEHOLDER_TEXT_RUNTIME = 0 , TEMPLATE_PLACEHOLDER_HTML_RUNTIME = 1 , TEMPLATE_PLACEHOLDER_PATH_RUNTIME = 2 , TEMPLATE_PLACEHOLDER_URL_RUNTIME = 3 }

Functions

static const char * json_option_value_runtime (int argc, char **argv, const char *name)
static int emit_text_line_runtime (const char *text)
static void text_buffer_free_runtime (TextBufferRuntime *buffer)
static int text_buffer_reserve_runtime (TextBufferRuntime *buffer, size_t needed_length)
static int text_buffer_append_text_runtime (TextBufferRuntime *buffer, const char *text)
static int text_buffer_append_char_runtime (TextBufferRuntime *buffer, char value)
static int text_buffer_append_format_runtime (TextBufferRuntime *buffer, const char *format,...)
static char * text_buffer_take_runtime (TextBufferRuntime *buffer)
static int dispatch_native_json_command_entries (int argc, char **argv, const NativeJsonCommandDispatchEntry *entries, size_t entry_count)
static int handle_bundle_manifest_slice_order_command (int argc, char **argv)
static char * json_value_tostring_dup_runtime (yyjson_val *value)
static int json_value_truthy_runtime (yyjson_val *value)
static int text_buffer_append_html_escaped_runtime (TextBufferRuntime *buffer, const char *text)
static int emit_compact_json_mut_value_runtime (yyjson_mut_val *value)
static int digits_only_text_runtime (const char *text)
static char * template_value_text_dup_runtime (yyjson_val *value)
static int template_reference_contains_unsafe_char_runtime (const char *text)
 Checks whether a reference candidate contains unsafe control bytes.
static int template_reference_has_scheme_runtime (const char *text)
 Tests whether a reference begins with a URI scheme prefix.
static int template_reference_has_allowed_url_scheme_runtime (const char *text)
 Tests whether a reference uses one permitted external URL scheme.
static int template_path_reference_allowed_runtime (const char *text)
 Tests whether one candidate path reference is safe for HTML URL attributes.
static int template_url_reference_allowed_runtime (const char *text)
 Tests whether one candidate URL reference is safe for HTML URL attributes.
static int text_buffer_append_template_value_runtime (TextBufferRuntime *buffer, yyjson_val *value, TemplatePlaceholderKindRuntime kind)
 Appends one template placeholder value using the requested safety mode.
static TemplatePlaceholderKindRuntime template_placeholder_kind_runtime (const char *placeholder_name, const char **param_name)
 Parses one placeholder token into its rendering mode and JSON key name.
static char * render_template_text_with_default_kind_dup_runtime (const char *template_text, yyjson_val *params_root, TemplatePlaceholderKindRuntime default_kind)
 Renders one template string using one caller-selected default placeholder mode.
static char * render_business_fragment_dup_runtime (const char *app_root, const char *fragment_name, yyjson_val *params_root)
static char * render_business_fragment_from_doc_dup_runtime (const char *app_root, const char *fragment_name, yyjson_mut_doc *doc)
static char * render_service_visual_html_dup_runtime (const char *app_root, const char *image_url, const char *service_name)
static char * render_service_sort_order_options_html_dup_runtime (yyjson_val *root, long business_id, long selected_order, int include_append, const char *app_root)
static char * render_service_booking_options_editor_html_dup_runtime (yyjson_val *root, long service_id, const char *app_root)
static int emit_service_book_form_page_json_runtime (yyjson_val *root, const char *slug, long service_id, const char *app_root, const char *error_message)
static char * render_technician_checkboxes_html_dup_runtime (yyjson_val *root, long business_id, long service_id, const char *empty_message, int select_all, const char *app_root)
static int parse_hhmm_minutes_runtime (const char *value, int *minutes_out)
static int parse_ymd_runtime (const char *date_value, int *year_out, int *month_out, int *day_out)
static int time_ranges_overlap_runtime (int start_a_minutes, int duration_a, int start_b_minutes, int duration_b)
static int business_open_for_slot_runtime (yyjson_val *root, long business_id, const char *date_value, const char *time_value, long duration_minutes)
static int technician_booked_for_slot_runtime (yyjson_val *root, long technician_id, const char *date_value, const char *time_value, long duration_minutes)
static long assign_technician_for_slot_runtime (yyjson_val *root, long business_id, long service_id, const char *date_value, const char *time_value)
static int days_in_month_runtime (int year, int month)
static const char * month_name_runtime (int month)
static void month_shift_runtime (int year, int month, int shift, int *out_year, int *out_month)
static int weekday_monday_index_runtime (int year, int month, int day)
static const char * day_abbrev_for_ymd_runtime (int year, int month, int day)
static int append_date_runtime (TextBufferRuntime *buffer, int year, int month, int day)
static char * url_decode_dup_runtime (const char *text)
static char * query_value_decoded_dup_runtime (const char *raw_query, const char *key)
static char * resolve_command_path_runtime (const char *command)
 Tests whether an executable command name resolves through PATH.
static int command_exists_in_path_runtime (const char *command)
static int run_sqlite_command_runtime (const char *sqlite_path, const char *sql_text, char **output_out)
 Executes one sqlite SQL batch through the native sqlite3 C API.
static char * sqlite_query_value_runtime (const char *sqlite_path, const char *sql_text)
static int append_escaped_sql_char_runtime (TextBufferRuntime *buffer, char value)
static char * sql_literal_escape_dup_runtime (const char *value)
static int write_temp_text_file_runtime (const char *text, char **path_out)
static char * capture_checksum_output_runtime (const char *command, const char *arg1, const char *arg2, const char *file_path, int *code_out)
static char * checksum_string_runtime (const char *value)
static char * cksum_signature_runtime (const char *value)
static char * dynamic_sqlite_path_dup_runtime (const char *app_root, const char *runtime_conf_path, const char *app_id)
static int sqlite_apply_file_list_runtime (const char *sqlite_path, const char *app_root, yyjson_val *list)
static char * migration_expected_checksum_dup_runtime (const char *app_root, yyjson_val *migration_record, const char *backend)
static yyjson_valmigration_backend_record_runtime (yyjson_val *root, const char *backend_value)
static char * ucal_runtime_state_export_sqlite_path_dup_runtime (const char *app_root)
 Resolves the declarative sqlite export query path for UCAL runtime-state bridge export.
static char * ucal_runtime_state_import_sqlite_path_dup_runtime (const char *app_root)
 Resolves the declarative sqlite import query path for UCAL runtime-state bridge import.
static char * ucal_runtime_state_export_postgresql_path_dup_runtime (const char *app_root)
 Resolves the declarative postgresql export query path for UCAL runtime-state bridge export.
static char * ucal_runtime_state_import_postgresql_path_dup_runtime (const char *app_root)
 Resolves the declarative postgresql import query path for UCAL runtime-state bridge import.
static int run_postgresql_sql_capture_runtime (const DynamicPostgresqlRuntimeConfig *config, const char *sql_text, int at_output, char **output_out)
 Runs one PostgreSQL SQL text payload through the native libpq driver.
static char * dynamic_relational_runtime_export_json_dup_runtime (const char *app_root, const char *runtime_conf_path, const char *app_id)
 Exports UCAL relational runtime state into canonical JSON using the configured backend contract.
static char * dynamic_relational_runtime_audit_count_dup_runtime (const char *app_root, const char *runtime_conf_path, const char *app_id)
 Returns the current audit-event count for one dynamic relational runtime using the configured backend contract.
static int dynamic_relational_runtime_import_state_runtime (const char *app_root, const char *runtime_conf_path, const char *app_id, const char *state_path, const char *expected_audit_count)
 Imports canonical UCAL relational runtime state using the configured backend contract.
static int handle_template_apply_base_path_command (int argc, char **argv)
static int handle_template_declared_page_contract_command (int argc, char **argv)
 Emits one UCAL declared page contract as JSON.
static int handle_template_declared_fragment_path_command (int argc, char **argv)
 Emits one UCAL declared fragment template path as text.
static int handle_template_layout_page_html_command (int argc, char **argv)
static int handle_template_layout_page_json_command (int argc, char **argv)
static int handle_template_login_page_json_command (int argc, char **argv)
static int handle_template_register_page_json_command (int argc, char **argv)
static int handle_template_password_reset_request_page_json_command (int argc, char **argv)
static int handle_template_password_reset_sent_page_json_command (int argc, char **argv)
static int handle_template_password_reset_complete_page_json_command (int argc, char **argv)
static int handle_template_invite_created_page_json_command (int argc, char **argv)
static int handle_template_invite_accept_page_json_command (int argc, char **argv)
static int handle_generated_surface_manage_page_json_command (int argc, char **argv)
static int handle_generated_surface_edit_page_json_command (int argc, char **argv)
yyjson_valload_root_from_text_runtime (const char *text, yyjson_doc **doc_out)
 Parses JSON text into a yyjson_val root.
static int emit_compact_json_value_runtime (yyjson_val *value)
static int emit_compact_mutable_json_doc_runtime (yyjson_mut_doc *doc)
static int write_mutable_json_doc_runtime (yyjson_mut_doc *doc, const char *path)
unsigned char * read_file_bytes_dup_runtime (const char *path, size_t *out_size)
 Reads one file into an owned binary buffer and appends a trailing NUL byte for text helpers.
int write_binary_file_runtime (const char *path, const unsigned char *data, size_t length)
 Writes one binary byte range to a file path, creating parent directories as needed.
static const unsigned char * memmem_runtime (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len)
 Finds the first binary needle occurrence within a byte range.
static char * multipart_boundary_dup_runtime (const char *content_type)
 Extracts the multipart boundary token from a content type value.
static char * multipart_header_param_dup_runtime (const char *headers_text, const char *key)
 Extracts one quoted Content-Disposition parameter from multipart headers.
static int multipart_find_part_runtime (const unsigned char *body, size_t body_len, const char *content_type, const char *field_name, char **out_text, char **out_filename, const unsigned char **out_content_start, size_t *out_content_len)
 Finds one multipart part by field name and optionally returns its filename and content range.
static char * request_form_field_value_dup_runtime (const char *content_type, const char *form_body, const char *body_path, const char *field_name)
 Resolves one request form field from urlencoded or multipart request inputs.
static int handle_request_form_field_command (int argc, char **argv)
 Returns one request form field value from urlencoded or multipart request inputs.
static int handle_request_cookie_value_command (int argc, char **argv)
 Extracts a cookie value from a Cookie header string.
static int handle_request_form_value_command (int argc, char **argv)
 Extracts a value from a URL-encoded form body.
static int handle_request_query_value_command (int argc, char **argv)
 Extracts a parameter value from a query string.
static int handle_dynamic_multipart_filename_command (int argc, char **argv)
 Extracts the uploaded filename from a multipart file part.
static int handle_dynamic_multipart_extract_text_command (int argc, char **argv)
 Extracts a text value from a multipart form field.
static int handle_dynamic_multipart_extract_file_command (int argc, char **argv)
 Extracts a file from a multipart upload and writes it to disk.
static int handle_request_booking_options_json_from_form_command (int argc, char **argv)
 Extracts booking option rows directly from repeated request form fields.
static int handle_bundle_manifest_layer_for_slice_command (int argc, char **argv)
static int handle_request_compact_json_command (int argc, char **argv)
static int handle_request_compact_object_command (int argc, char **argv)
static int handle_request_compact_object_strict_command (int argc, char **argv)
static int handle_request_field_command (int argc, char **argv)
static int handle_manifest_fixture_path_raw_command (int argc, char **argv)
static int handle_manifest_app_root_command (int argc, char **argv)
static yyjson_valfind_form_field_value_runtime (yyjson_val *root, const char *form_id, const char *field_id)
static int handle_form_field_json_command (int argc, char **argv)
static int handle_form_field_json_lines_command (int argc, char **argv)
static int handle_form_options_csv_command (int argc, char **argv)
static int handle_form_options_html_command (int argc, char **argv)
static int handle_object_field_string_command (int argc, char **argv)
static int handle_object_field_number_command (int argc, char **argv)
static int handle_object_field_text_command (int argc, char **argv)
static int handle_object_array_length_command (int argc, char **argv)
static int handle_object_array_all_integers_command (int argc, char **argv)
static yyjson_valobject_value_at_path_runtime (yyjson_val *root, const char *path)
static int handle_object_path_json_command (int argc, char **argv)
static int handle_object_path_string_command (int argc, char **argv)
static int handle_object_path_number_command (int argc, char **argv)
static int handle_object_path_bool_command (int argc, char **argv)
static int handle_object_path_array_length_command (int argc, char **argv)
static int handle_object_array_item_json_lines_command (int argc, char **argv)
static int handle_object_array_lines_command (int argc, char **argv)
static int handle_object_relative_path_array_to_absolute_json_command (int argc, char **argv)
static int handle_file_compact_object_command (int argc, char **argv)
static int handle_file_field_string_command (int argc, char **argv)
static int handle_file_field_number_command (int argc, char **argv)
static int handle_file_section_length_command (int argc, char **argv)
static int dynamic_config_key_is_path_runtime (const char *key)
 Returns non-zero when a dynamic config key should resolve relative to its owning config file.
static char * resolve_dynamic_config_value_runtime (const char *conf_path, const char *key, const char *raw_value)
 Resolves one raw dynamic config value against its owning config file when needed.
static char * dynamic_conf_lookup_runtime (const char *conf_path, const char *key)
 Loads one raw config value from a path when the file exists.
static char * dynamic_merged_config_value_runtime (const char *app_root, const char *runtime_conf_path, const char *key)
 Loads one merged dynamic config value with runtime-conf precedence over app-local config.
static int handle_dynamic_config_value_command (int argc, char **argv)
 Emits one merged dynamic config value.
static int handle_dynamic_relational_backend_command (int argc, char **argv)
 Emits the configured dynamic relational backend when it is recognized.
static int handle_dynamic_relational_sqlite_path_command (int argc, char **argv)
 Emits the effective sqlite path for a dynamic app.
static int handle_dynamic_safe_upload_filename_command (int argc, char **argv)
 Emits the safe Pharos filename for an uploaded media candidate.
static int handle_dynamic_media_disk_path_command (int argc, char **argv)
 Emits the on-disk artifact path for a managed media URL.
static int handle_dynamic_ensure_business_media_tree_command (int argc, char **argv)
 Ensures the managed business media subtree exists under an app artifact.
static int handle_dynamic_remove_media_url_file_command (int argc, char **argv)
 Removes one managed business media file from an app artifact when it exists.
static int handle_dynamic_store_uploaded_media_command (int argc, char **argv)
 Extracts one multipart upload into the app artifact media tree and returns the resulting media URL.
static int sqlite_capture_callback_runtime (void *context_void, int column_count, char **column_values, char **column_names)
 Captures sqlite result rows into the shared text buffer using CLI-compatible separators.
static int postgresql_apply_file_list_runtime (const DynamicPostgresqlRuntimeConfig *config, const char *app_root, yyjson_val *list)
 Applies one declarative SQL file list through the native PostgreSQL driver.
static void free_dynamic_postgresql_runtime_config (DynamicPostgresqlRuntimeConfig *config)
 Releases owned PostgreSQL runtime connection settings.
static int load_dynamic_postgresql_runtime_config (const char *app_root, const char *runtime_conf_path, DynamicPostgresqlRuntimeConfig *config)
 Loads merged PostgreSQL runtime connection settings for one dynamic app.
static int conninfo_append_text_runtime (TextBufferRuntime *buffer, const char *text, int escape_quotes)
 Appends one libpq conninfo key or value fragment with native escaping.
static int conninfo_append_kv_runtime (TextBufferRuntime *buffer, const char *key, const char *value)
 Appends one libpq conninfo key value pair.
static void * open_libpq_handle_candidate_runtime (const char *path)
 Attempts to open one libpq shared library path.
static int load_native_libpq_api_runtime (NativeLibpqApi *api)
 Loads the native libpq client ABI from cached image prefixes or standard library names.
static void free_native_libpq_api_runtime (NativeLibpqApi *api)
 Releases one resolved native libpq ABI loader handle.
static char * postgresql_conninfo_dup_runtime (const DynamicPostgresqlRuntimeConfig *config)
 Builds one libpq conninfo string from merged runtime config values.
static int capture_postgresql_result_output_runtime (const NativeLibpqApi *api, PGresult *result, char **output_out)
 Captures one tuple-producing PostgreSQL result into CLI-compatible line output.
static char * runtime_state_placeholder_sql_dup_runtime (const char *sql_template, const char *escaped_state_json)
 Replaces the canonical runtime-state placeholder inside one declarative SQL template.
static int identifier_safe_runtime (const char *text)
 Tests whether one identifier contains only letters, digits, and underscores.
static int load_cli_postgresql_runtime_config (int argc, char **argv, DynamicPostgresqlRuntimeConfig *config)
 Loads PostgreSQL connection settings from explicit JSON command options.
static int duplicate_postgresql_runtime_config_with_database_runtime (const DynamicPostgresqlRuntimeConfig *source, const char *database_name, DynamicPostgresqlRuntimeConfig *copy_out)
 Duplicates one PostgreSQL runtime configuration while replacing the database name.
static int emit_digit_bool_runtime (int truthy)
 Emits one digit boolean result for shell callers.
static int handle_db_sqlite_table_exists_command (int argc, char **argv)
 Emits whether one sqlite table exists.
static int handle_db_sqlite_table_row_count_command (int argc, char **argv)
 Emits one sqlite table row count.
static int handle_db_sqlite_table_count_command (int argc, char **argv)
 Emits one sqlite non-system table count.
static int handle_db_sqlite_migration_applied_count_command (int argc, char **argv)
 Emits one sqlite migration applied count.
static int handle_db_sqlite_migration_applied_schema_version_command (int argc, char **argv)
 Emits one sqlite migration applied schema version.
static int handle_db_sqlite_migration_applied_checksum_command (int argc, char **argv)
 Emits one sqlite migration applied checksum.
static int handle_db_sqlite_reconcile_migration_checksum_command (int argc, char **argv)
 Updates a sqlite migration checksum when the ledger row is missing one.
static int handle_db_sqlite_record_migration_command (int argc, char **argv)
 Inserts one sqlite migration ledger record.
static int handle_db_sqlite_audit_event_count_command (int argc, char **argv)
 Emits the current sqlite audit event count.
static int handle_db_sqlite_query_value_command (int argc, char **argv)
 Emits the first-line output of one sqlite query.
static int handle_db_sqlite_exec_command (int argc, char **argv)
 Executes one sqlite SQL text payload.
static int handle_db_sqlite_exec_file_command (int argc, char **argv)
 Executes one sqlite SQL file.
static int handle_db_postgresql_database_exists_command (int argc, char **argv)
 Emits whether one PostgreSQL database exists.
static int handle_db_postgresql_create_database_if_missing_command (int argc, char **argv)
 Creates one PostgreSQL database when it is missing.
static int handle_db_postgresql_table_exists_command (int argc, char **argv)
 Emits whether one PostgreSQL table exists in the public schema.
static int handle_db_postgresql_table_row_count_command (int argc, char **argv)
 Emits one PostgreSQL public table row count.
static int handle_db_postgresql_public_table_count_command (int argc, char **argv)
 Emits the current PostgreSQL public table count.
static int handle_db_postgresql_migration_applied_count_command (int argc, char **argv)
 Emits one PostgreSQL migration applied count.
static int handle_db_postgresql_migration_applied_schema_version_command (int argc, char **argv)
 Emits one PostgreSQL migration applied schema version.
static int handle_db_postgresql_migration_applied_checksum_command (int argc, char **argv)
 Emits one PostgreSQL migration applied checksum.
static int handle_db_postgresql_reconcile_migration_checksum_command (int argc, char **argv)
 Updates one PostgreSQL migration checksum when the ledger row is missing one.
static int handle_db_postgresql_audit_event_count_command (int argc, char **argv)
 Emits the current PostgreSQL audit event count.
static int handle_db_postgresql_query_value_command (int argc, char **argv)
 Emits the first-line output of one PostgreSQL query.
static int handle_db_postgresql_exec_command (int argc, char **argv)
 Executes one PostgreSQL SQL text payload.
static int handle_db_postgresql_exec_file_command (int argc, char **argv)
 Executes one PostgreSQL SQL file.
static int handle_dynamic_file_signature_command (int argc, char **argv)
 Emits a stable file signature for change detection.
static int handle_dynamic_relational_runtime_export_json_command (int argc, char **argv)
 Emits canonical exported JSON for a sqlite-backed dynamic relational runtime.
static int handle_dynamic_relational_runtime_audit_count_command (int argc, char **argv)
 Emits the current audit-event count for a sqlite-backed dynamic relational runtime.
static int handle_dynamic_relational_runtime_import_state_command (int argc, char **argv)
 Imports canonical state into a sqlite-backed dynamic relational runtime.
static int handle_dynamic_sqlite_runtime_ready_command (int argc, char **argv)
 Emits whether the sqlite dynamic runtime prerequisites are currently satisfied.
static int handle_dynamic_postgresql_runtime_ready_command (int argc, char **argv)
 Prepares the sqlite dynamic runtime schema, seed data, and migration ledger.
static int handle_dynamic_postgresql_runtime_prepare_command (int argc, char **argv)
 Prepares the PostgreSQL dynamic runtime schema, seed data, and migration ledger.
static int handle_dynamic_sqlite_runtime_prepare_command (int argc, char **argv)
static yyjson_valmigration_record_by_id_runtime (yyjson_val *root, const char *migration_id)
static int handle_file_migration_backend_list_lines_command (int argc, char **argv)
static int handle_file_migration_backend_record_json_command (int argc, char **argv)
static int handle_file_migration_rows_lines_command (int argc, char **argv)
static int handle_file_migration_backend_files_json_command (int argc, char **argv)
static int handle_file_normalize_ucal_state_command (int argc, char **argv)
static yyjson_mut_valensure_mut_array_field_runtime (yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *field_name)
static int emit_json_string_runtime (const char *text)
static int handle_request_checkbox_id_array_json_command (int argc, char **argv)
static int trim_ascii_whitespace_range_runtime (const char *start, size_t len, const char **trimmed_start, size_t *trimmed_len)
static int digits_only_runtime (const char *text, size_t len)
static int handle_request_lines_to_booking_options_json_command (int argc, char **argv)
static int handle_object_merge_command (int argc, char **argv)
static int handle_object_build_command (int argc, char **argv)
static int emit_template_text_runtime (const char *template_text, yyjson_val *params_root)
char * render_template_text_dup_runtime (const char *template_text, yyjson_val *params_root)
 Renders one HTML template text string with JSON parameter substitution.
char * render_path_template_text_dup_runtime (const char *template_text, yyjson_val *params_root)
 Renders one path-oriented template text string with JSON substitution.
char * join_base_relative_path_dup_runtime (const char *base_path, const char *relative_path)
 Joins a base path and a relative path into one string.
char * render_file_template_dup_runtime (const char *template_file, yyjson_val *params_root)
 Reads a template file and renders it with JSON parameter substitution.
static char * business_media_url_dup_runtime (const char *business_slug, const char *media_url)
static char * service_media_url_dup_runtime (const char *business_slug, const char *media_url)
static char * app_root_relative_path_dup_runtime (const char *app_root, const char *relative_path)
 Joins an app root with one relative template path.
static const char * ucal_declared_page_relative_path_runtime (const char *page_id)
 Resolves one UCAL declared page id to its app-relative page-spec path.
char * declared_page_relative_path_dup_runtime (const char *app_root, const char *page_id)
 Resolves one UCAL declared page id to its app-relative page-spec path.
static const char * ucal_declared_fragment_relative_path_runtime (const char *fragment_id)
 Resolves one UCAL declared fragment id to its app-relative template path.
static char * day_of_week_options_html_dup_runtime (const char *selected_day)
static int handle_template_render_path_command (int argc, char **argv)
static int handle_template_render_file_command (int argc, char **argv)
char * apply_base_path_html_dup_runtime (const char *html, const char *base_path)
 Rewrites relative URLs in HTML to use a base path.
char * html_escaped_dup_runtime (const char *text)
 Escapes one plain-text string for safe HTML insertion.
char * error_alert_html_dup_runtime (const char *message)
 Renders an error alert.
char * hidden_next_input_html_dup_runtime (const char *next_path)
 Renders a hidden next-path <input> HTML, or an empty string.
static int emit_template_page_params_json_runtime (const char *error_html, const char *next_input, const char *account_type_options_html, const char *preview_html, const char *reset_post_path, const char *invite_email, const char *invite_path, const char *return_path, const char *invite_kind, const char *target_html, const char *form_action)
char * language_options_html_dup_runtime (const char *current_lang)
char * render_page_html_dup_runtime (const char *app_root, const char *base_path, const char *layout_id, const char *title, const char *body, const char *current_lang, const char *current_request_target, int has_user, int managed_business_count)
 Builds the nav context and renders a full layout page.
static int handle_validation_empty_report_command (int argc, char **argv)
static int append_validation_error_runtime (const char *report_json, const char *array_name, const char *field_id, const char *rule_id, const char *code_text, const char *message)
static int handle_validation_add_field_error_command (int argc, char **argv)
static int handle_validation_add_form_error_command (int argc, char **argv)
static int handle_validation_has_errors_command (int argc, char **argv)
static int handle_validation_summary_text_command (int argc, char **argv)
static int handle_validation_field_list_html_command (int argc, char **argv)
static int handle_error_envelope_command (int argc, char **argv)
static int handle_validation_error_envelope_command (int argc, char **argv)
static int long_from_value_runtime (yyjson_val *value, long *out)
static yyjson_valfind_array_item_by_string_field_runtime (yyjson_val *array_value, const char *field_name, const char *expected_value)
static int value_long_equals_runtime (yyjson_val *value, long expected_value)
static long max_id_in_state_section_runtime (yyjson_val *root, const char *section_name)
static yyjson_mut_valnormalized_payload_object_mut_runtime (yyjson_mut_doc *doc, const char *payload_json)
static yyjson_valfind_array_item_by_long_field_runtime (yyjson_val *array_value, const char *field_name, long expected_value)
static yyjson_valstate_array_runtime (yyjson_val *root, const char *key)
static yyjson_valstate_find_business_by_slug_runtime (yyjson_val *root, const char *slug)
static yyjson_valstate_find_business_by_id_runtime (yyjson_val *root, long business_id)
static yyjson_valstate_find_service_by_id_runtime (yyjson_val *root, long service_id)
static yyjson_valstate_find_service_for_business_runtime (yyjson_val *root, long service_id, long business_id)
static yyjson_valstate_find_first_service_for_business_runtime (yyjson_val *root, long business_id)
static int streq_casefold_runtime (const char *left, const char *right)
static yyjson_valstate_find_user_by_username_runtime (yyjson_val *root, const char *username)
static yyjson_valstate_find_user_by_email_runtime (yyjson_val *root, const char *email)
static yyjson_valstate_find_user_by_id_runtime (yyjson_val *root, long user_id)
static yyjson_valstate_find_appointment_by_id_runtime (yyjson_val *root, long appointment_id)
static yyjson_valstate_find_technician_by_id_runtime (yyjson_val *root, long technician_id)
static yyjson_valstate_find_technician_for_business_runtime (yyjson_val *root, long technician_id, long business_id)
static yyjson_valstate_find_business_availability_for_business_runtime (yyjson_val *root, long availability_id, long business_id)
static yyjson_valstate_find_booking_for_user_runtime (yyjson_val *root, long booking_id, long user_id)
static yyjson_valstate_find_google_calendar_connection_for_business_runtime (yyjson_val *root, long business_id)
static long state_tenant_id_for_business_id_runtime (yyjson_val *root, long business_id)
static long state_tenant_id_for_business_slug_runtime (yyjson_val *root, const char *slug)
static long state_tenant_id_for_service_id_runtime (yyjson_val *root, long service_id)
static long state_tenant_id_for_technician_id_runtime (yyjson_val *root, long technician_id)
static int emit_json_or_empty_runtime (yyjson_val *value)
static int emit_long_runtime (long value)
static yyjson_mut_valfind_mut_array_item_by_long_field_runtime (yyjson_mut_val *array_value, const char *field_name, long expected_value)
static int merge_patch_into_mut_object_runtime (yyjson_mut_doc *mut_doc, yyjson_mut_val *target_obj, yyjson_val *patch_root)
static int emit_object_string_field_runtime (yyjson_val *obj, const char *field_name, const char *default_value)
static int emit_service_assigned_technician_ids_lines_runtime (yyjson_val *root, yyjson_val *service, long business_id)
static int emit_business_technician_ids_lines_runtime (yyjson_val *root, long business_id)
static void free_business_admin_service_list_runtime (business_admin_service_list_runtime *list)
static int append_business_admin_service_runtime (business_admin_service_list_runtime *list, yyjson_val *service, long sort_order, long service_id)
static int compare_business_admin_service_runtime (const void *left_ptr, const void *right_ptr)
static int collect_business_service_list_runtime (yyjson_val *services, long business_id, business_admin_service_list_runtime *list)
static int emit_business_public_page_json_runtime (yyjson_val *root, const char *slug, long user_id)
static int emit_business_admin_service_rows_json_runtime (yyjson_val *root, long business_id)
static int emit_business_admin_technician_rows_json_runtime (yyjson_val *root, long business_id)
static int emit_business_calendar_page_json_runtime (yyjson_val *root, const char *slug)
static int emit_business_public_render_page_json_runtime (yyjson_val *root, const char *slug, long user_id, const char *app_root)
static int emit_business_calendar_render_page_json_runtime (yyjson_val *root, const char *slug, const char *app_root, const char *selected_year_text, const char *selected_month_text, const char *selected_date_text)
char * business_calendar_render_page_params_json_dup_runtime (const char *state_path, const char *business_slug, const char *app_root, const char *selected_year_text, const char *selected_month_text, const char *selected_date_text)
static int emit_business_availability_lines_runtime (yyjson_val *root, long business_id, const char *day_name)
static int emit_technician_availability_lines_runtime (yyjson_val *root, long technician_id, const char *day_name)
static int emit_technician_appointments_lines_runtime (yyjson_val *root, long technician_id, const char *date_value)
static int emit_active_tenant_ids_lines_runtime (yyjson_val *root)
static int emit_user_membership_tenant_ids_json_runtime (yyjson_val *root, long user_id)
static int json_array_contains_long_runtime (yyjson_val *array_value, long wanted)
static long tenant_id_for_business_runtime (yyjson_val *root, long business_id)
static int emit_manageable_business_cards_json_runtime (yyjson_val *root, yyjson_val *tenant_ids)
static char * render_business_admin_empty_state_dup_runtime (const char *app_root, const char *message)
static char * service_abbreviation_dup_runtime (const char *name)
static const char * service_badge_color_runtime (const char *name)
char * service_book_form_page_params_json_dup_runtime (const char *state_path, const char *business_slug, long service_id, const char *app_root, const char *error_message)
 Builds rendered service-book-form page params JSON from runtime state.
static char * render_business_dashboard_cards_html_dup_runtime (yyjson_val *root, yyjson_val *tenant_ids, const char *app_root)
static int emit_business_dashboard_page_json_runtime (yyjson_val *root, yyjson_val *tenant_ids, const char *app_root)
static int emit_business_admin_page_json_runtime (yyjson_val *root, const char *slug, const char *app_root, const char *invite_account_type_options_html)
static int emit_explore_page_json_runtime (yyjson_val *root, const char *app_root)
 Emits rendered explore-page template params using declarative business card fragments.
static int emit_profile_render_page_json_runtime (yyjson_val *root, long user_id, const char *app_root, const char *payment_preference_options_html)
 Emits rendered profile-page template params using declarative subscription fragments.
static int user_manages_business_runtime (yyjson_val *root, long user_id, long business_id)
char * profile_render_page_params_json_dup_runtime (const char *state_path, long user_id, const char *app_root, const char *payment_preference_options_html)
 Builds rendered profile page params JSON from runtime state.
static int emit_calendar_page_json_runtime (yyjson_val *root, long user_id, yyjson_val *tenant_ids, const char *app_root)
 Emits rendered calendar-page template params using declarative booking and appointment fragments.
static int emit_appointments_page_json_runtime (yyjson_val *root, long user_id, yyjson_val *tenant_ids, const char *app_root)
static int emit_business_edit_page_json_runtime (yyjson_val *root, const char *slug)
char * explore_render_page_params_json_dup_runtime (const char *state_path, const char *app_root)
 Builds rendered appointments page params JSON from runtime state.
char * business_landing_render_page_params_json_dup_runtime (const char *state_path, const char *business_slug, long user_id, const char *app_root)
char * appointments_render_page_params_json_dup_runtime (const char *state_path, long user_id, const char *app_root)
 Builds rendered appointments page params JSON from runtime state.
char * diagnostics_render_page_params_json_dup_runtime (const char *state_path)
char * business_dashboard_render_page_params_json_dup_runtime (const char *state_path, long user_id, const char *app_root)
 Builds rendered business dashboard page params JSON from runtime state.
char * business_detail_admin_render_page_params_json_dup_runtime (const char *state_path, const char *business_slug, const char *app_root)
 Builds rendered business admin page params JSON from runtime state.
char * business_edit_page_params_json_dup_runtime (const char *state_path, const char *business_slug)
 Builds rendered business-edit page params JSON from runtime state.
static int emit_service_edit_page_json_runtime (yyjson_val *root, const char *slug, long service_id, const char *app_root)
static int emit_technician_edit_page_json_runtime (yyjson_val *root, const char *slug, long technician_id)
static int emit_public_business_cards_json_runtime (yyjson_val *root)
static int emit_user_appointments_json_runtime (yyjson_val *root, long user_id)
static int emit_managed_appointments_json_runtime (yyjson_val *root, yyjson_val *tenant_ids)
static int emit_profile_page_json_runtime (yyjson_val *root, long user_id)
static yyjson_valfind_active_token_record_runtime (yyjson_val *array_value, const char *token_hash, const char *now_iso)
static void json_value_list_free_runtime (json_value_list_runtime *list)
static int json_value_list_append_runtime (json_value_list_runtime *list, yyjson_val *item)
static int compare_item_id_runtime (const void *lhs_ptr, const void *rhs_ptr)
static int emit_json_line_runtime (yyjson_val *value)
static int emit_sorted_section_lines_runtime (yyjson_val *root, const char *section_name)
static int seen_long_pair_runtime (long *values, size_t count, long first, long second)
static int handle_state_ucal_import_row_json_lines_command (yyjson_val *root, const char *section_name)
static void free_event_stream_row_runtime (event_stream_row_runtime *row)
static void free_event_stream_row_list_runtime (event_stream_row_list_runtime *list)
static int append_event_stream_row_runtime (event_stream_row_list_runtime *list, event_stream_row_runtime *row)
static char * dup_or_default_runtime (const char *text, const char *fallback)
static long payload_first_long_runtime (yyjson_val *payload, const char **fields, size_t field_count)
static char * payload_first_string_dup_runtime (yyjson_val *payload, const char **fields, size_t field_count)
static int long_in_array_runtime (yyjson_val *array_value, long expected_value)
static char * resource_kind_from_resource_id_runtime (const char *resource_id)
static char * event_stream_resource_id_dup_runtime (yyjson_val *payload)
static long event_stream_tenant_id_runtime (yyjson_val *root, yyjson_val *payload, long business_id)
static int add_json_string_or_null_runtime (yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *key, const char *value)
static int compare_event_stream_rows_runtime (const void *lhs_ptr, const void *rhs_ptr)
static int event_stream_allowed_by_scope_runtime (yyjson_val *subscription_scope, long event_user_id, long event_tenant_id)
static int event_stream_matches_filters_runtime (yyjson_val *filters, const event_stream_row_runtime *row)
static int collect_event_stream_row_runtime (event_stream_row_list_runtime *rows, yyjson_val *root, const char *source, const char *event_kind_default, yyjson_val *payload, const char *created_at_field_fallback, long native_order, yyjson_val *subscription_scope, yyjson_val *filters, const char *created_at_override, const char *event_kind_override)
static int handle_state_event_stream_row_json_lines_command (yyjson_val *root, yyjson_val *subscription_scope, yyjson_val *filters, long since_id, long limit_value)
static int handle_state_named_command (int argc, char **argv)
static int route_template_match_into_mut_obj_runtime (yyjson_mut_doc *doc, const char *template_path, const char *request_path, yyjson_mut_val **out_params)
static int handle_file_generated_surface_match_command (int argc, char **argv)
static int json_value_equals_text_runtime (yyjson_val *value, const char *expected)
static int contains_casefold_runtime (const char *haystack, const char *needle)
static int weekday_rank_runtime (const char *value)
static yyjson_valsurface_find_by_id_runtime (yyjson_val *root, const char *surface_id)
static yyjson_valsurface_find_form_runtime (yyjson_val *root, const char *form_id)
static yyjson_valsurface_find_record_by_string_field_runtime (yyjson_val *root, const char *collection_name, const char *field_name, const char *expected_value)
static int surface_context_match_runtime (yyjson_val *item, const char *scope_field, yyjson_val *context_id_value)
static int surface_filter_item_runtime (yyjson_val *item, yyjson_val *filters)
static int surface_compare_sort_values_runtime (yyjson_val *left_item, yyjson_val *right_item, const char *field_name, const char *type_name)
static void surface_sort_items_runtime (json_value_list_runtime *list, yyjson_val *sort_config)
static char * generated_surface_label_from_field_runtime (const char *field_name)
static int generated_surface_report_add_field_error_runtime (yyjson_mut_doc *doc, yyjson_mut_val *report_root, const char *field_id, const char *rule_id, const char *code_text, const char *message)
static int generated_surface_array_contains_string_runtime (yyjson_val *array, const char *wanted)
static char * generated_surface_delete_strategy_runtime (yyjson_val *surface_root)
static int compare_generated_surface_order_item_runtime (const void *left_ptr, const void *right_ptr)
static int generated_surface_normalize_order_mut_runtime (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *surface_root, yyjson_val *context_root)
static int generated_surface_append_audit_event_mut_runtime (yyjson_mut_doc *mut_doc, yyjson_mut_val *mut_root, yyjson_val *surface_root, const char *operation_name, yyjson_val *user_root, yyjson_val *context_root, yyjson_val *item_root, const char *created_at)
static int generated_surface_relation_array_all_integers_runtime (yyjson_val *array)
static int generated_surface_text_is_decimal_runtime (const char *text)
static int generated_surface_text_is_email_runtime (const char *text)
static int generated_surface_text_is_time_runtime (const char *text)
static int generated_surface_text_is_date_runtime (const char *text)
static yyjson_mut_valsurface_build_sort_config_runtime (yyjson_mut_doc *doc, yyjson_val *surface_root, const char *raw_query)
static yyjson_mut_valsurface_build_active_filters_runtime (yyjson_mut_doc *doc, yyjson_val *surface_root, const char *raw_query)
static int handle_generated_surface_list_columns_json_command (int argc, char **argv)
static int handle_generated_surface_params_json_command (int argc, char **argv)
static char * generated_surface_display_value_dup_runtime (yyjson_val *item_root, const char *field_name)
static int handle_generated_surface_display_value_command (int argc, char **argv)
static char * html_escape_dup_runtime (const char *text)
static int append_generated_surface_select_options_html_runtime (TextBufferRuntime *buffer, yyjson_val *field_root, const char *selected_value)
static int append_generated_surface_relation_checkboxes_html_runtime (TextBufferRuntime *buffer, yyjson_val *state_root, yyjson_val *relation_root, yyjson_val *context_root, yyjson_val *selected_root)
static char * build_generated_surface_form_fields_html_runtime (yyjson_val *state_root, yyjson_val *fixture_root, yyjson_val *surface_root, yyjson_val *context_root, yyjson_val *item_root)
static char * build_generated_surface_filter_controls_html_runtime (yyjson_val *surface_root, const char *raw_query)
static char * build_generated_surface_sort_options_html_runtime (yyjson_val *surface_root, const char *raw_query)
static int handle_generated_surface_select_options_html_command (int argc, char **argv)
static int handle_generated_surface_relation_checkboxes_html_command (int argc, char **argv)
static char * generated_surface_delete_button_label_dup_runtime (yyjson_val *surface_root)
static char * generated_surface_operation_path_dup_runtime (yyjson_val *surface_root, yyjson_val *context_root, const char *operation_name, const char *identity_value)
static int handle_generated_surface_manage_table_json_command (int argc, char **argv)
static int handle_generated_surface_form_fields_html_command (int argc, char **argv)
static int handle_generated_surface_filter_controls_html_command (int argc, char **argv)
static int handle_generated_surface_sort_options_html_command (int argc, char **argv)
static int handle_generated_surface_context_command (int argc, char **argv)
static int handle_generated_surface_coerce_candidate_command (int argc, char **argv)
static int handle_generated_surface_submitted_command (int argc, char **argv)
static int handle_generated_surface_list_result_command (int argc, char **argv)
static int handle_generated_surface_default_candidate_command (int argc, char **argv)
static int handle_generated_surface_validation_report_command (int argc, char **argv)
static int handle_generated_surface_mutate_command (int argc, char **argv)
int handle_native_json_command (int argc, char **argv)

Macro Definition Documentation

◆ PHAROS_CONN_STATUS_OK_RUNTIME

#define PHAROS_CONN_STATUS_OK_RUNTIME   0

Definition at line 2597 of file native_json_runtime_ops.c.

◆ PHAROS_PGRES_COMMAND_OK_RUNTIME

#define PHAROS_PGRES_COMMAND_OK_RUNTIME   1

Definition at line 2598 of file native_json_runtime_ops.c.

◆ PHAROS_PGRES_SINGLE_TUPLE_RUNTIME

#define PHAROS_PGRES_SINGLE_TUPLE_RUNTIME   9

Definition at line 2600 of file native_json_runtime_ops.c.

◆ PHAROS_PGRES_TUPLES_OK_RUNTIME

#define PHAROS_PGRES_TUPLES_OK_RUNTIME   2

Definition at line 2599 of file native_json_runtime_ops.c.

Typedef Documentation

◆ DynamicPostgresqlRuntimeConfig

typedef struct DynamicPostgresqlRuntimeConfig DynamicPostgresqlRuntimeConfig

Carries resolved PostgreSQL runtime connection settings for native relational bridge commands.

Definition at line 60 of file native_json_runtime_ops.c.

◆ NativeJsonCommandHandlerFn

typedef int(* NativeJsonCommandHandlerFn) (int argc, char **argv)

Definition at line 51 of file native_json_runtime_ops.c.

Enumeration Type Documentation

◆ TemplatePlaceholderKindRuntime

Enumerator
TEMPLATE_PLACEHOLDER_TEXT_RUNTIME 
TEMPLATE_PLACEHOLDER_HTML_RUNTIME 
TEMPLATE_PLACEHOLDER_PATH_RUNTIME 
TEMPLATE_PLACEHOLDER_URL_RUNTIME 

Definition at line 265 of file native_json_runtime_ops.c.

Function Documentation

◆ add_json_string_or_null_runtime()

int add_json_string_or_null_runtime ( yyjson_mut_doc * doc,
yyjson_mut_val * obj,
const char * key,
const char * value )
static

◆ app_root_relative_path_dup_runtime()

char * app_root_relative_path_dup_runtime ( const char * app_root,
const char * relative_path )
static

Joins an app root with one relative template path.

Parameters
app_rootUCAL app root directory.
relative_pathRelative path under the app root.
Returns
Newly allocated absolute path, or NULL on failure.

Definition at line 5103 of file native_json_runtime_ops.c.

Referenced by declared_page_relative_path_dup_runtime(), handle_template_declared_fragment_path_command(), and handle_template_declared_page_contract_command().

◆ append_business_admin_service_runtime()

◆ append_date_runtime()

int append_date_runtime ( TextBufferRuntime * buffer,
int year,
int month,
int day )
static

◆ append_escaped_sql_char_runtime()

int append_escaped_sql_char_runtime ( TextBufferRuntime * buffer,
char value )
static

◆ append_event_stream_row_runtime()

◆ append_generated_surface_relation_checkboxes_html_runtime()

◆ append_generated_surface_select_options_html_runtime()

◆ append_validation_error_runtime()

int append_validation_error_runtime ( const char * report_json,
const char * array_name,
const char * field_id,
const char * rule_id,
const char * code_text,
const char * message )
static

◆ apply_base_path_html_dup_runtime()

char * apply_base_path_html_dup_runtime ( const char * html,
const char * base_path )

Rewrites relative URLs in HTML to use a base path.

Parameters
htmlOriginal HTML string.
base_pathURL base path to prepend, or NULL for no change.
Returns
Newly allocated scoped HTML string, or NULL on failure. Caller must free.

Definition at line 5272 of file native_json_runtime_ops.c.

References streq(), text_buffer_append_format_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), and text_buffer_take_runtime().

Referenced by handle_template_apply_base_path_command(), handle_template_layout_page_html_command(), and render_page_html_dup_runtime().

◆ appointments_render_page_params_json_dup_runtime()

◆ assign_technician_for_slot_runtime()

◆ build_generated_surface_filter_controls_html_runtime()

◆ build_generated_surface_form_fields_html_runtime()

◆ build_generated_surface_sort_options_html_runtime()

◆ business_calendar_render_page_params_json_dup_runtime()

◆ business_dashboard_render_page_params_json_dup_runtime()

char * business_dashboard_render_page_params_json_dup_runtime ( const char * state_path,
long user_id,
const char * app_root )

◆ business_detail_admin_render_page_params_json_dup_runtime()

char * business_detail_admin_render_page_params_json_dup_runtime ( const char * state_path,
const char * business_slug,
const char * app_root )

◆ business_edit_page_params_json_dup_runtime()

char * business_edit_page_params_json_dup_runtime ( const char * state_path,
const char * business_slug )

Builds rendered business-edit page params JSON from runtime state.

Uses the native state model to produce the parameter object expected by templates/businesses/business_edit.body.html.

Parameters
state_pathOn-disk runtime state JSON path.
business_slugBusiness slug from the matched route.
Returns
Newly allocated compact JSON string, or NULL on failure. Caller must free.

Definition at line 11743 of file native_json_runtime_ops.c.

References business_media_url_dup_runtime(), json_value_truthy_runtime(), native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_string_dup(), state_find_business_by_slug_runtime(), streq(), text_buffer_append_html_escaped_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), yyjson_doc_get_root(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_strcpy(), yyjson_mut_write(), and YYJSON_WRITE_NOFLAG.

Referenced by resolve_declared_page_params_json_runtime().

◆ business_landing_render_page_params_json_dup_runtime()

◆ business_media_url_dup_runtime()

◆ business_open_for_slot_runtime()

int business_open_for_slot_runtime ( yyjson_val * root,
long business_id,
const char * date_value,
const char * time_value,
long duration_minutes )
static

◆ capture_checksum_output_runtime()

char * capture_checksum_output_runtime ( const char * command,
const char * arg1,
const char * arg2,
const char * file_path,
int * code_out )
static

◆ capture_postgresql_result_output_runtime()

int capture_postgresql_result_output_runtime ( const NativeLibpqApi * api,
PGresult * result,
char ** output_out )
static

Captures one tuple-producing PostgreSQL result into CLI-compatible line output.

Parameters
apiLoaded libpq function table.
resultQuery result to serialize.
output_outReceives owned serialized text.
Returns
Native status code.

Definition at line 2776 of file native_json_runtime_ops.c.

References NativeLibpqApi::PQgetvalue, NativeLibpqApi::PQnfields, NativeLibpqApi::PQntuples, text_buffer_append_char_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), and trim_in_place().

Referenced by run_postgresql_sql_capture_runtime().

◆ checksum_string_runtime()

char * checksum_string_runtime ( const char * value)
static

◆ cksum_signature_runtime()

char * cksum_signature_runtime ( const char * value)
static

◆ collect_business_service_list_runtime()

◆ collect_event_stream_row_runtime()

◆ command_exists_in_path_runtime()

int command_exists_in_path_runtime ( const char * command)
static

Definition at line 2036 of file native_json_runtime_ops.c.

References resolve_command_path_runtime().

Referenced by checksum_string_runtime().

◆ compare_business_admin_service_runtime()

int compare_business_admin_service_runtime ( const void * left_ptr,
const void * right_ptr )
static

◆ compare_event_stream_rows_runtime()

int compare_event_stream_rows_runtime ( const void * lhs_ptr,
const void * rhs_ptr )
static

◆ compare_generated_surface_order_item_runtime()

int compare_generated_surface_order_item_runtime ( const void * left_ptr,
const void * right_ptr )
static

◆ compare_item_id_runtime()

int compare_item_id_runtime ( const void * lhs_ptr,
const void * rhs_ptr )
static

◆ conninfo_append_kv_runtime()

int conninfo_append_kv_runtime ( TextBufferRuntime * buffer,
const char * key,
const char * value )
static

Appends one libpq conninfo key value pair.

Parameters
bufferDestination text buffer.
keyConninfo key name.
valueConninfo value.
Returns
Non-zero on success, otherwise 0.

Definition at line 2632 of file native_json_runtime_ops.c.

References conninfo_append_text_runtime(), TextBufferRuntime::length, and text_buffer_append_char_runtime().

Referenced by postgresql_conninfo_dup_runtime().

◆ conninfo_append_text_runtime()

int conninfo_append_text_runtime ( TextBufferRuntime * buffer,
const char * text,
int escape_quotes )
static

Appends one libpq conninfo key or value fragment with native escaping.

Parameters
bufferDestination text buffer.
textFragment text.
escape_quotesNon-zero to escape backslashes and single quotes.
Returns
Non-zero on success, otherwise 0.

Definition at line 2609 of file native_json_runtime_ops.c.

References text_buffer_append_char_runtime().

Referenced by conninfo_append_kv_runtime().

◆ contains_casefold_runtime()

int contains_casefold_runtime ( const char * haystack,
const char * needle )
static

Definition at line 14857 of file native_json_runtime_ops.c.

Referenced by surface_filter_item_runtime().

◆ day_abbrev_for_ymd_runtime()

const char * day_abbrev_for_ymd_runtime ( int year,
int month,
int day )
static

◆ day_of_week_options_html_dup_runtime()

char * day_of_week_options_html_dup_runtime ( const char * selected_day)
static

◆ days_in_month_runtime()

int days_in_month_runtime ( int year,
int month )
static

◆ declared_page_relative_path_dup_runtime()

char * declared_page_relative_path_dup_runtime ( const char * app_root,
const char * page_id )

Resolves one UCAL declared page id to its app-relative page-spec path.

Parameters
page_idDeclared UCAL page id (e.g. "login", "register").
Returns
Matching relative path string, or NULL when unknown.
Note
The returned pointer is borrowed from an internal table and must NOT be freed by the caller.

Definition at line 5022 of file native_json_runtime_ops.c.

References app_root_relative_path_dup_runtime(), path_exists(), and ucal_declared_page_relative_path_runtime().

Referenced by handle_page_route(), handle_template_declared_page_contract_command(), and render_declared_page_response_with_headers_runtime().

◆ diagnostics_render_page_params_json_dup_runtime()

◆ digits_only_runtime()

int digits_only_runtime ( const char * text,
size_t len )
static

Definition at line 4394 of file native_json_runtime_ops.c.

References len.

Referenced by handle_request_lines_to_booking_options_json_command().

◆ digits_only_text_runtime()

◆ dispatch_native_json_command_entries()

int dispatch_native_json_command_entries ( int argc,
char ** argv,
const NativeJsonCommandDispatchEntry * entries,
size_t entry_count )
static

◆ dup_or_default_runtime()

char * dup_or_default_runtime ( const char * text,
const char * fallback )
static

Definition at line 12676 of file native_json_runtime_ops.c.

Referenced by collect_event_stream_row_runtime().

◆ duplicate_postgresql_runtime_config_with_database_runtime()

int duplicate_postgresql_runtime_config_with_database_runtime ( const DynamicPostgresqlRuntimeConfig * source,
const char * database_name,
DynamicPostgresqlRuntimeConfig * copy_out )
static

◆ dynamic_conf_lookup_runtime()

char * dynamic_conf_lookup_runtime ( const char * conf_path,
const char * key )
static

Loads one raw config value from a path when the file exists.

Parameters
conf_pathConfig file path.
keyConfig key name.
Returns
Newly allocated raw value, or NULL when the key or file is missing.

Definition at line 1818 of file native_json_runtime_ops.c.

References conf_lookup_value(), and path_exists().

Referenced by dynamic_merged_config_value_runtime().

◆ dynamic_config_key_is_path_runtime()

int dynamic_config_key_is_path_runtime ( const char * key)
static

Returns non-zero when a dynamic config key should resolve relative to its owning config file.

Parameters
keyConfig key name.
Returns
Non-zero when the key is path-bearing, otherwise 0.

Definition at line 1786 of file native_json_runtime_ops.c.

References streq().

Referenced by resolve_dynamic_config_value_runtime().

◆ dynamic_merged_config_value_runtime()

char * dynamic_merged_config_value_runtime ( const char * app_root,
const char * runtime_conf_path,
const char * key )
static

Loads one merged dynamic config value with runtime-conf precedence over app-local config.

Parameters
app_rootApp root directory.
runtime_conf_pathRuntime config path from the environment.
keyConfig key name.
Returns
Newly allocated resolved value, or NULL when the key is absent.

Definition at line 1832 of file native_json_runtime_ops.c.

References app_local_conf_path_native(), dynamic_conf_lookup_runtime(), and resolve_dynamic_config_value_runtime().

Referenced by dynamic_relational_runtime_audit_count_dup_runtime(), dynamic_relational_runtime_export_json_dup_runtime(), dynamic_relational_runtime_import_state_runtime(), dynamic_sqlite_path_dup_runtime(), and load_dynamic_postgresql_runtime_config().

◆ dynamic_relational_runtime_audit_count_dup_runtime()

char * dynamic_relational_runtime_audit_count_dup_runtime ( const char * app_root,
const char * runtime_conf_path,
const char * app_id )
static

Returns the current audit-event count for one dynamic relational runtime using the configured backend contract.

Parameters
app_rootApp root directory.
runtime_conf_pathRuntime config path.
app_idDynamic app identifier.
Returns
Newly allocated count text, or NULL on failure.

Definition at line 2957 of file native_json_runtime_ops.c.

References dynamic_merged_config_value_runtime(), dynamic_sqlite_path_dup_runtime(), free_dynamic_postgresql_runtime_config(), load_dynamic_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), sqlite_query_value_runtime(), and streq().

Referenced by dynamic_relational_runtime_import_state_runtime().

◆ dynamic_relational_runtime_export_json_dup_runtime()

char * dynamic_relational_runtime_export_json_dup_runtime ( const char * app_root,
const char * runtime_conf_path,
const char * app_id )
static

Exports UCAL relational runtime state into canonical JSON using the configured backend contract.

Parameters
app_rootApp root directory.
runtime_conf_pathRuntime config path.
app_idDynamic app identifier.
Returns
Newly allocated compact state JSON, or NULL on failure.

Definition at line 2906 of file native_json_runtime_ops.c.

References dynamic_merged_config_value_runtime(), dynamic_sqlite_path_dup_runtime(), free_dynamic_postgresql_runtime_config(), load_dynamic_postgresql_runtime_config(), read_file_text(), run_postgresql_sql_capture_runtime(), run_sqlite_command_runtime(), streq(), ucal_runtime_state_export_postgresql_path_dup_runtime(), and ucal_runtime_state_export_sqlite_path_dup_runtime().

◆ dynamic_relational_runtime_import_state_runtime()

int dynamic_relational_runtime_import_state_runtime ( const char * app_root,
const char * runtime_conf_path,
const char * app_id,
const char * state_path,
const char * expected_audit_count )
static

Imports canonical UCAL relational runtime state using the configured backend contract.

Parameters
app_rootApp root directory.
runtime_conf_pathRuntime config path.
app_idDynamic app identifier.
state_pathCanonical state JSON path.
expected_audit_countOptional optimistic concurrency guard.
Returns
Native status code.

Definition at line 3014 of file native_json_runtime_ops.c.

References dynamic_merged_config_value_runtime(), dynamic_relational_runtime_audit_count_dup_runtime(), dynamic_sqlite_path_dup_runtime(), free_dynamic_postgresql_runtime_config(), load_dynamic_postgresql_runtime_config(), read_file_text(), run_postgresql_sql_capture_runtime(), run_sqlite_command_runtime(), runtime_state_placeholder_sql_dup_runtime(), sql_literal_escape_dup_runtime(), streq(), ucal_runtime_state_import_postgresql_path_dup_runtime(), and ucal_runtime_state_import_sqlite_path_dup_runtime().

◆ dynamic_sqlite_path_dup_runtime()

char * dynamic_sqlite_path_dup_runtime ( const char * app_root,
const char * runtime_conf_path,
const char * app_id )
static

◆ emit_active_tenant_ids_lines_runtime()

◆ emit_appointments_page_json_runtime()

◆ emit_business_admin_page_json_runtime()

int emit_business_admin_page_json_runtime ( yyjson_val * root,
const char * slug,
const char * app_root,
const char * invite_account_type_options_html )
static

Definition at line 9408 of file native_json_runtime_ops.c.

References collect_business_service_list_runtime(), business_admin_service_list_runtime::count, day_of_week_options_html_dup_runtime(), emit_compact_json_mut_value_runtime(), free_business_admin_service_list_runtime(), business_admin_service_list_runtime::items, json_value_truthy_runtime(), TextBufferRuntime::length, long_from_value_runtime(), native_json_obj_get(), native_json_obj_get_array(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), render_business_admin_empty_state_dup_runtime(), render_business_fragment_from_doc_dup_runtime(), render_service_booking_options_editor_html_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), business_admin_service_runtime::service, business_admin_service_runtime::service_id, service_media_url_dup_runtime(), state_array_runtime(), state_find_business_by_slug_runtime(), state_find_google_calendar_connection_for_business_runtime(), TextBufferRuntime::text, text_buffer_append_format_runtime(), text_buffer_append_html_escaped_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), value_long_equals_runtime(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_is_obj(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_int(), yyjson_mut_obj_add_strcpy(), yyjson_mut_obj_put(), and yyjson_mut_strcpy().

Referenced by handle_state_named_command().

◆ emit_business_admin_service_rows_json_runtime()

◆ emit_business_admin_technician_rows_json_runtime()

◆ emit_business_availability_lines_runtime()

int emit_business_availability_lines_runtime ( yyjson_val * root,
long business_id,
const char * day_name )
static

◆ emit_business_calendar_page_json_runtime()

◆ emit_business_calendar_render_page_json_runtime()

◆ emit_business_dashboard_page_json_runtime()

◆ emit_business_edit_page_json_runtime()

◆ emit_business_public_page_json_runtime()

◆ emit_business_public_render_page_json_runtime()

◆ emit_business_technician_ids_lines_runtime()

int emit_business_technician_ids_lines_runtime ( yyjson_val * root,
long business_id )
static

◆ emit_calendar_page_json_runtime()

int emit_calendar_page_json_runtime ( yyjson_val * root,
long user_id,
yyjson_val * tenant_ids,
const char * app_root )
static

◆ emit_compact_json_mut_value_runtime()

int emit_compact_json_mut_value_runtime ( yyjson_mut_val * value)
static

Definition at line 6163 of file native_json_runtime_ops.c.

References yyjson_mut_val_write(), and YYJSON_WRITE_NOFLAG.

Referenced by emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_dashboard_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_calendar_page_json_runtime(), emit_explore_page_json_runtime(), emit_manageable_business_cards_json_runtime(), emit_managed_appointments_json_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_public_business_cards_json_runtime(), emit_service_book_form_page_json_runtime(), emit_service_edit_page_json_runtime(), emit_technician_edit_page_json_runtime(), emit_template_page_params_json_runtime(), emit_user_appointments_json_runtime(), handle_file_generated_surface_match_command(), handle_generated_surface_coerce_candidate_command(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_request_booking_options_json_from_form_command(), handle_state_event_stream_row_json_lines_command(), handle_template_declared_page_contract_command(), and handle_template_layout_page_json_command().

◆ emit_compact_json_value_runtime()

◆ emit_compact_mutable_json_doc_runtime()

◆ emit_digit_bool_runtime()

int emit_digit_bool_runtime ( int truthy)
static

Emits one digit boolean result for shell callers.

Parameters
truthyNon-zero when the answer is true.
Returns
Native status code.

Definition at line 3184 of file native_json_runtime_ops.c.

Referenced by handle_db_postgresql_database_exists_command(), handle_db_postgresql_table_exists_command(), and handle_db_sqlite_table_exists_command().

◆ emit_explore_page_json_runtime()

int emit_explore_page_json_runtime ( yyjson_val * root,
const char * app_root )
static

◆ emit_json_line_runtime()

int emit_json_line_runtime ( yyjson_val * value)
static

◆ emit_json_or_empty_runtime()

int emit_json_or_empty_runtime ( yyjson_val * value)
static

Definition at line 6442 of file native_json_runtime_ops.c.

References emit_compact_json_value_runtime().

Referenced by handle_state_named_command().

◆ emit_json_string_runtime()

◆ emit_long_runtime()

int emit_long_runtime ( long value)
static

Definition at line 6449 of file native_json_runtime_ops.c.

Referenced by handle_state_named_command().

◆ emit_manageable_business_cards_json_runtime()

◆ emit_managed_appointments_json_runtime()

◆ emit_object_string_field_runtime()

int emit_object_string_field_runtime ( yyjson_val * obj,
const char * field_name,
const char * default_value )
static

Definition at line 6490 of file native_json_runtime_ops.c.

References native_json_obj_get_string_dup().

Referenced by handle_state_named_command().

◆ emit_profile_page_json_runtime()

◆ emit_profile_render_page_json_runtime()

int emit_profile_render_page_json_runtime ( yyjson_val * root,
long user_id,
const char * app_root,
const char * payment_preference_options_html )
static

◆ emit_public_business_cards_json_runtime()

◆ emit_service_assigned_technician_ids_lines_runtime()

◆ emit_service_book_form_page_json_runtime()

◆ emit_service_edit_page_json_runtime()

◆ emit_sorted_section_lines_runtime()

◆ emit_technician_appointments_lines_runtime()

int emit_technician_appointments_lines_runtime ( yyjson_val * root,
long technician_id,
const char * date_value )
static

◆ emit_technician_availability_lines_runtime()

int emit_technician_availability_lines_runtime ( yyjson_val * root,
long technician_id,
const char * day_name )
static

◆ emit_technician_edit_page_json_runtime()

◆ emit_template_page_params_json_runtime()

int emit_template_page_params_json_runtime ( const char * error_html,
const char * next_input,
const char * account_type_options_html,
const char * preview_html,
const char * reset_post_path,
const char * invite_email,
const char * invite_path,
const char * return_path,
const char * invite_kind,
const char * target_html,
const char * form_action )
static

◆ emit_template_text_runtime()

int emit_template_text_runtime ( const char * template_text,
yyjson_val * params_root )
static

◆ emit_text_line_runtime()

int emit_text_line_runtime ( const char * text)
static

◆ emit_user_appointments_json_runtime()

◆ emit_user_membership_tenant_ids_json_runtime()

◆ ensure_mut_array_field_runtime()

◆ error_alert_html_dup_runtime()

◆ event_stream_allowed_by_scope_runtime()

int event_stream_allowed_by_scope_runtime ( yyjson_val * subscription_scope,
long event_user_id,
long event_tenant_id )
static

◆ event_stream_matches_filters_runtime()

◆ event_stream_resource_id_dup_runtime()

char * event_stream_resource_id_dup_runtime ( yyjson_val * payload)
static

◆ event_stream_tenant_id_runtime()

long event_stream_tenant_id_runtime ( yyjson_val * root,
yyjson_val * payload,
long business_id )
static

◆ explore_render_page_params_json_dup_runtime()

char * explore_render_page_params_json_dup_runtime ( const char * state_path,
const char * app_root )

Builds rendered appointments page params JSON from runtime state.

Parameters
state_pathOn-disk runtime state JSON path.
user_idSigned-in user id.
app_rootApp root used to locate declarative fragments when needed.
Returns
Newly allocated compact JSON string, or NULL on failure. Caller must free.

Builds rendered explore page params JSON from runtime state.

Parameters
state_pathOn-disk runtime state JSON path.
app_rootApp root used to locate declarative fragments when needed.
Returns
Newly allocated compact JSON string, or NULL on failure. Caller must free.

Definition at line 10683 of file native_json_runtime_ops.c.

References business_media_url_dup_runtime(), TextBufferRuntime::length, native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_string_dup(), render_business_fragment_from_doc_dup_runtime(), state_array_runtime(), TextBufferRuntime::text, text_buffer_append_text_runtime(), text_buffer_free_runtime(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_doc_get_root(), yyjson_get_bool(), yyjson_is_bool(), yyjson_is_obj(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_strcpy(), yyjson_mut_write(), and YYJSON_WRITE_NOFLAG.

Referenced by resolve_declared_page_params_json_runtime().

◆ find_active_token_record_runtime()

yyjson_val * find_active_token_record_runtime ( yyjson_val * array_value,
const char * token_hash,
const char * now_iso )
static

◆ find_array_item_by_long_field_runtime()

◆ find_array_item_by_string_field_runtime()

yyjson_val * find_array_item_by_string_field_runtime ( yyjson_val * array_value,
const char * field_name,
const char * expected_value )
static

◆ find_form_field_value_runtime()

yyjson_val * find_form_field_value_runtime ( yyjson_val * root,
const char * form_id,
const char * field_id )
static

◆ find_mut_array_item_by_long_field_runtime()

yyjson_mut_val * find_mut_array_item_by_long_field_runtime ( yyjson_mut_val * array_value,
const char * field_name,
long expected_value )
static

◆ free_business_admin_service_list_runtime()

◆ free_dynamic_postgresql_runtime_config()

void free_dynamic_postgresql_runtime_config ( DynamicPostgresqlRuntimeConfig * config)
static

Releases owned PostgreSQL runtime connection settings.

Parameters
configRuntime configuration to clear.

Definition at line 2515 of file native_json_runtime_ops.c.

References DynamicPostgresqlRuntimeConfig::database, DynamicPostgresqlRuntimeConfig::host, DynamicPostgresqlRuntimeConfig::password_env_name, DynamicPostgresqlRuntimeConfig::port, DynamicPostgresqlRuntimeConfig::tls_cert, DynamicPostgresqlRuntimeConfig::tls_key, DynamicPostgresqlRuntimeConfig::tls_mode, DynamicPostgresqlRuntimeConfig::tls_root_cert, and DynamicPostgresqlRuntimeConfig::user.

Referenced by duplicate_postgresql_runtime_config_with_database_runtime(), dynamic_relational_runtime_audit_count_dup_runtime(), dynamic_relational_runtime_export_json_dup_runtime(), dynamic_relational_runtime_import_state_runtime(), handle_db_postgresql_audit_event_count_command(), handle_db_postgresql_create_database_if_missing_command(), handle_db_postgresql_database_exists_command(), handle_db_postgresql_exec_command(), handle_db_postgresql_exec_file_command(), handle_db_postgresql_migration_applied_checksum_command(), handle_db_postgresql_migration_applied_count_command(), handle_db_postgresql_migration_applied_schema_version_command(), handle_db_postgresql_public_table_count_command(), handle_db_postgresql_query_value_command(), handle_db_postgresql_reconcile_migration_checksum_command(), handle_db_postgresql_table_exists_command(), handle_db_postgresql_table_row_count_command(), load_cli_postgresql_runtime_config(), and load_dynamic_postgresql_runtime_config().

◆ free_event_stream_row_list_runtime()

◆ free_event_stream_row_runtime()

◆ free_native_libpq_api_runtime()

void free_native_libpq_api_runtime ( NativeLibpqApi * api)
static

Releases one resolved native libpq ABI loader handle.

Parameters
apiLoaded libpq function table.

Definition at line 2723 of file native_json_runtime_ops.c.

References NativeLibpqApi::handle.

Referenced by run_postgresql_sql_capture_runtime().

◆ generated_surface_append_audit_event_mut_runtime()

◆ generated_surface_array_contains_string_runtime()

int generated_surface_array_contains_string_runtime ( yyjson_val * array,
const char * wanted )
static

◆ generated_surface_delete_button_label_dup_runtime()

◆ generated_surface_delete_strategy_runtime()

char * generated_surface_delete_strategy_runtime ( yyjson_val * surface_root)
static

◆ generated_surface_display_value_dup_runtime()

◆ generated_surface_label_from_field_runtime()

◆ generated_surface_normalize_order_mut_runtime()

◆ generated_surface_operation_path_dup_runtime()

◆ generated_surface_relation_array_all_integers_runtime()

int generated_surface_relation_array_all_integers_runtime ( yyjson_val * array)
static

◆ generated_surface_report_add_field_error_runtime()

int generated_surface_report_add_field_error_runtime ( yyjson_mut_doc * doc,
yyjson_mut_val * report_root,
const char * field_id,
const char * rule_id,
const char * code_text,
const char * message )
static

◆ generated_surface_text_is_date_runtime()

int generated_surface_text_is_date_runtime ( const char * text)
static

◆ generated_surface_text_is_decimal_runtime()

int generated_surface_text_is_decimal_runtime ( const char * text)
static

◆ generated_surface_text_is_email_runtime()

int generated_surface_text_is_email_runtime ( const char * text)
static

◆ generated_surface_text_is_time_runtime()

int generated_surface_text_is_time_runtime ( const char * text)
static

◆ handle_bundle_manifest_layer_for_slice_command()

◆ handle_bundle_manifest_slice_order_command()

◆ handle_db_postgresql_audit_event_count_command()

int handle_db_postgresql_audit_event_count_command ( int argc,
char ** argv )
static

Emits the current PostgreSQL audit event count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3826 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), and streq().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_create_database_if_missing_command()

int handle_db_postgresql_create_database_if_missing_command ( int argc,
char ** argv )
static

Creates one PostgreSQL database when it is missing.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3553 of file native_json_runtime_ops.c.

References duplicate_postgresql_runtime_config_with_database_runtime(), free_dynamic_postgresql_runtime_config(), identifier_safe_runtime(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), sql_literal_escape_dup_runtime(), and streq().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_database_exists_command()

int handle_db_postgresql_database_exists_command ( int argc,
char ** argv )
static

◆ handle_db_postgresql_exec_command()

int handle_db_postgresql_exec_command ( int argc,
char ** argv )
static

Executes one PostgreSQL SQL text payload.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3881 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), and run_postgresql_sql_capture_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_exec_file_command()

int handle_db_postgresql_exec_file_command ( int argc,
char ** argv )
static

Executes one PostgreSQL SQL file.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3899 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), read_file_text(), and run_postgresql_sql_capture_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_migration_applied_checksum_command()

int handle_db_postgresql_migration_applied_checksum_command ( int argc,
char ** argv )
static

Emits one PostgreSQL migration applied checksum.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3753 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), and sql_literal_escape_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_migration_applied_count_command()

int handle_db_postgresql_migration_applied_count_command ( int argc,
char ** argv )
static

Emits one PostgreSQL migration applied count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3679 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), and sql_literal_escape_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_migration_applied_schema_version_command()

int handle_db_postgresql_migration_applied_schema_version_command ( int argc,
char ** argv )
static

Emits one PostgreSQL migration applied schema version.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3716 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), and sql_literal_escape_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_public_table_count_command()

int handle_db_postgresql_public_table_count_command ( int argc,
char ** argv )
static

Emits the current PostgreSQL public table count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3657 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), load_cli_postgresql_runtime_config(), and run_postgresql_sql_capture_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_query_value_command()

int handle_db_postgresql_query_value_command ( int argc,
char ** argv )
static

Emits the first-line output of one PostgreSQL query.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3858 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), and run_postgresql_sql_capture_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_reconcile_migration_checksum_command()

int handle_db_postgresql_reconcile_migration_checksum_command ( int argc,
char ** argv )
static

Updates one PostgreSQL migration checksum when the ledger row is missing one.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3790 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), and sql_literal_escape_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_table_exists_command()

int handle_db_postgresql_table_exists_command ( int argc,
char ** argv )
static

Emits whether one PostgreSQL table exists in the public schema.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3599 of file native_json_runtime_ops.c.

References emit_digit_bool_runtime(), free_dynamic_postgresql_runtime_config(), identifier_safe_runtime(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), run_postgresql_sql_capture_runtime(), sql_literal_escape_dup_runtime(), and streq().

Referenced by handle_native_json_command().

◆ handle_db_postgresql_table_row_count_command()

int handle_db_postgresql_table_row_count_command ( int argc,
char ** argv )
static

Emits one PostgreSQL public table row count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3632 of file native_json_runtime_ops.c.

References free_dynamic_postgresql_runtime_config(), identifier_safe_runtime(), json_option_value_runtime(), load_cli_postgresql_runtime_config(), and run_postgresql_sql_capture_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_audit_event_count_command()

int handle_db_sqlite_audit_event_count_command ( int argc,
char ** argv )
static

Emits the current sqlite audit event count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3430 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_exec_command()

int handle_db_sqlite_exec_command ( int argc,
char ** argv )
static

Executes one sqlite SQL text payload.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3476 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and run_sqlite_command_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_exec_file_command()

int handle_db_sqlite_exec_file_command ( int argc,
char ** argv )
static

Executes one sqlite SQL file.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3491 of file native_json_runtime_ops.c.

References json_option_value_runtime(), read_file_text(), and run_sqlite_command_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_migration_applied_checksum_command()

int handle_db_sqlite_migration_applied_checksum_command ( int argc,
char ** argv )
static

Emits one sqlite migration applied checksum.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3328 of file native_json_runtime_ops.c.

References json_option_value_runtime(), sql_literal_escape_dup_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_migration_applied_count_command()

int handle_db_sqlite_migration_applied_count_command ( int argc,
char ** argv )
static

Emits one sqlite migration applied count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3262 of file native_json_runtime_ops.c.

References json_option_value_runtime(), sql_literal_escape_dup_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_migration_applied_schema_version_command()

int handle_db_sqlite_migration_applied_schema_version_command ( int argc,
char ** argv )
static

Emits one sqlite migration applied schema version.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3295 of file native_json_runtime_ops.c.

References json_option_value_runtime(), sql_literal_escape_dup_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_query_value_command()

int handle_db_sqlite_query_value_command ( int argc,
char ** argv )
static

Emits the first-line output of one sqlite query.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3455 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_reconcile_migration_checksum_command()

int handle_db_sqlite_reconcile_migration_checksum_command ( int argc,
char ** argv )
static

Updates a sqlite migration checksum when the ledger row is missing one.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3361 of file native_json_runtime_ops.c.

References json_option_value_runtime(), run_sqlite_command_runtime(), and sql_literal_escape_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_record_migration_command()

int handle_db_sqlite_record_migration_command ( int argc,
char ** argv )
static

Inserts one sqlite migration ledger record.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3395 of file native_json_runtime_ops.c.

References json_option_value_runtime(), run_sqlite_command_runtime(), and sql_literal_escape_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_table_count_command()

int handle_db_sqlite_table_count_command ( int argc,
char ** argv )
static

Emits one sqlite non-system table count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3244 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_table_exists_command()

int handle_db_sqlite_table_exists_command ( int argc,
char ** argv )
static

Emits whether one sqlite table exists.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3195 of file native_json_runtime_ops.c.

References emit_digit_bool_runtime(), identifier_safe_runtime(), json_option_value_runtime(), sql_literal_escape_dup_runtime(), sqlite_query_value_runtime(), and streq().

Referenced by handle_native_json_command().

◆ handle_db_sqlite_table_row_count_command()

int handle_db_sqlite_table_row_count_command ( int argc,
char ** argv )
static

Emits one sqlite table row count.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3223 of file native_json_runtime_ops.c.

References identifier_safe_runtime(), json_option_value_runtime(), and sqlite_query_value_runtime().

Referenced by handle_native_json_command().

◆ handle_dynamic_config_value_command()

int handle_dynamic_config_value_command ( int argc,
char ** argv )
static

Emits one merged dynamic config value.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1861 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_config_merged_value_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_ensure_business_media_tree_command()

int handle_dynamic_ensure_business_media_tree_command ( int argc,
char ** argv )
static

Ensures the managed business media subtree exists under an app artifact.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1960 of file native_json_runtime_ops.c.

References ensure_business_media_tree(), and json_option_value_runtime().

Referenced by handle_native_json_command().

◆ handle_dynamic_file_signature_command()

int handle_dynamic_file_signature_command ( int argc,
char ** argv )
static

Emits a stable file signature for change detection.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3924 of file native_json_runtime_ops.c.

References json_option_value_runtime(), path_exists(), and read_file_bytes_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_dynamic_media_disk_path_command()

int handle_dynamic_media_disk_path_command ( int argc,
char ** argv )
static

Emits the on-disk artifact path for a managed media URL.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1943 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and media_disk_path_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_multipart_extract_file_command()

int handle_dynamic_multipart_extract_file_command ( int argc,
char ** argv )
static

Extracts a file from a multipart upload and writes it to disk.

Registered as: dynamic multipart-extract-file –content-type CT –body-path PATH –field NAME –output PATH

Definition at line 884 of file native_json_runtime_ops.c.

References json_option_value_runtime(), native_dynamic_multipart_extract_file(), and read_file_bytes_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_dynamic_multipart_extract_text_command()

int handle_dynamic_multipart_extract_text_command ( int argc,
char ** argv )
static

Extracts a text value from a multipart form field.

Registered as: dynamic multipart-extract-text –content-type CT –body-path PATH –field NAME

Definition at line 856 of file native_json_runtime_ops.c.

References json_option_value_runtime(), native_dynamic_multipart_extract_text(), and read_file_bytes_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_dynamic_multipart_filename_command()

int handle_dynamic_multipart_filename_command ( int argc,
char ** argv )
static

Extracts the uploaded filename from a multipart file part.

Registered as: dynamic multipart-filename –content-type CT –body-path PATH –field NAME

Definition at line 828 of file native_json_runtime_ops.c.

References json_option_value_runtime(), native_dynamic_multipart_filename(), and read_file_bytes_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_dynamic_postgresql_runtime_prepare_command()

int handle_dynamic_postgresql_runtime_prepare_command ( int argc,
char ** argv )
static

Prepares the PostgreSQL dynamic runtime schema, seed data, and migration ledger.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 4050 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_postgresql_runtime_prepare().

Referenced by handle_native_json_command().

◆ handle_dynamic_postgresql_runtime_ready_command()

int handle_dynamic_postgresql_runtime_ready_command ( int argc,
char ** argv )
static

Prepares the sqlite dynamic runtime schema, seed data, and migration ledger.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 4034 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_postgresql_runtime_ready().

Referenced by handle_native_json_command().

◆ handle_dynamic_relational_backend_command()

int handle_dynamic_relational_backend_command ( int argc,
char ** argv )
static

Emits the configured dynamic relational backend when it is recognized.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1883 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_backend_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_relational_runtime_audit_count_command()

int handle_dynamic_relational_runtime_audit_count_command ( int argc,
char ** argv )
static

Emits the current audit-event count for a sqlite-backed dynamic relational runtime.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3979 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_runtime_audit_count_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_relational_runtime_export_json_command()

int handle_dynamic_relational_runtime_export_json_command ( int argc,
char ** argv )
static

Emits canonical exported JSON for a sqlite-backed dynamic relational runtime.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 3956 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_runtime_export_json_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_relational_runtime_import_state_command()

int handle_dynamic_relational_runtime_import_state_command ( int argc,
char ** argv )
static

Imports canonical state into a sqlite-backed dynamic relational runtime.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 4002 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_runtime_import_state().

Referenced by handle_native_json_command().

◆ handle_dynamic_relational_sqlite_path_command()

int handle_dynamic_relational_sqlite_path_command ( int argc,
char ** argv )
static

Emits the effective sqlite path for a dynamic app.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1904 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_sqlite_path_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_remove_media_url_file_command()

int handle_dynamic_remove_media_url_file_command ( int argc,
char ** argv )
static

Removes one managed business media file from an app artifact when it exists.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1972 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and remove_media_url_file().

Referenced by handle_native_json_command().

◆ handle_dynamic_safe_upload_filename_command()

int handle_dynamic_safe_upload_filename_command ( int argc,
char ** argv )
static

Emits the safe Pharos filename for an uploaded media candidate.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1926 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and safe_upload_filename_dup().

Referenced by handle_native_json_command().

◆ handle_dynamic_sqlite_runtime_prepare_command()

int handle_dynamic_sqlite_runtime_prepare_command ( int argc,
char ** argv )
static

◆ handle_dynamic_sqlite_runtime_ready_command()

int handle_dynamic_sqlite_runtime_ready_command ( int argc,
char ** argv )
static

Emits whether the sqlite dynamic runtime prerequisites are currently satisfied.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 4017 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_relational_sqlite_runtime_ready().

Referenced by handle_native_json_command().

◆ handle_dynamic_store_uploaded_media_command()

int handle_dynamic_store_uploaded_media_command ( int argc,
char ** argv )
static

Extracts one multipart upload into the app artifact media tree and returns the resulting media URL.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 1984 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and store_uploaded_media().

Referenced by handle_native_json_command().

◆ handle_error_envelope_command()

int handle_error_envelope_command ( int argc,
char ** argv )
static

◆ handle_file_compact_object_command()

int handle_file_compact_object_command ( int argc,
char ** argv )
static

◆ handle_file_field_number_command()

int handle_file_field_number_command ( int argc,
char ** argv )
static

◆ handle_file_field_string_command()

int handle_file_field_string_command ( int argc,
char ** argv )
static

◆ handle_file_generated_surface_match_command()

◆ handle_file_migration_backend_files_json_command()

◆ handle_file_migration_backend_list_lines_command()

◆ handle_file_migration_backend_record_json_command()

int handle_file_migration_backend_record_json_command ( int argc,
char ** argv )
static

◆ handle_file_migration_rows_lines_command()

◆ handle_file_normalize_ucal_state_command()

◆ handle_file_section_length_command()

int handle_file_section_length_command ( int argc,
char ** argv )
static

◆ handle_form_field_json_command()

◆ handle_form_field_json_lines_command()

◆ handle_form_options_csv_command()

◆ handle_form_options_html_command()

◆ handle_generated_surface_coerce_candidate_command()

◆ handle_generated_surface_context_command()

◆ handle_generated_surface_default_candidate_command()

◆ handle_generated_surface_display_value_command()

int handle_generated_surface_display_value_command ( int argc,
char ** argv )
static

◆ handle_generated_surface_edit_page_json_command()

◆ handle_generated_surface_filter_controls_html_command()

int handle_generated_surface_filter_controls_html_command ( int argc,
char ** argv )
static

◆ handle_generated_surface_form_fields_html_command()

◆ handle_generated_surface_list_columns_json_command()

◆ handle_generated_surface_list_result_command()

◆ handle_generated_surface_manage_page_json_command()

int handle_generated_surface_manage_page_json_command ( int argc,
char ** argv )
static

Definition at line 16725 of file native_json_runtime_ops.c.

References build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), build_generated_surface_sort_options_html_runtime(), json_value_list_runtime::count, digits_only_text_runtime(), emit_compact_json_mut_value_runtime(), generated_surface_delete_button_label_dup_runtime(), generated_surface_display_value_dup_runtime(), generated_surface_label_from_field_runtime(), generated_surface_operation_path_dup_runtime(), json_value_list_runtime::items, json_option_value_runtime(), json_value_list_append_runtime(), json_value_list_free_runtime(), json_value_tostring_dup_runtime(), TextBufferRuntime::length, load_root_from_text_runtime(), native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_array(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), native_json_serialize_compact_dup(), query_value_decoded_dup_runtime(), render_path_template_text_dup_runtime(), state_array_runtime(), streq(), surface_build_active_filters_runtime(), surface_build_sort_config_runtime(), surface_context_match_runtime(), surface_filter_item_runtime(), surface_sort_items_runtime(), text_buffer_append_format_runtime(), text_buffer_append_html_escaped_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_arr_size(), yyjson_doc_get_root(), yyjson_get_str(), yyjson_is_arr(), yyjson_is_obj(), yyjson_is_str(), yyjson_mut_arr(), yyjson_mut_arr_append(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_null(), yyjson_mut_obj(), yyjson_mut_obj_add_int(), yyjson_mut_obj_add_strcpy(), yyjson_mut_obj_put(), yyjson_mut_strcpy(), yyjson_mut_val_write(), yyjson_val_mut_copy(), and YYJSON_WRITE_NOFLAG.

Referenced by handle_native_json_command().

◆ handle_generated_surface_manage_table_json_command()

◆ handle_generated_surface_mutate_command()

◆ handle_generated_surface_params_json_command()

◆ handle_generated_surface_relation_checkboxes_html_command()

◆ handle_generated_surface_select_options_html_command()

◆ handle_generated_surface_sort_options_html_command()

int handle_generated_surface_sort_options_html_command ( int argc,
char ** argv )
static

◆ handle_generated_surface_submitted_command()

◆ handle_generated_surface_validation_report_command()

◆ handle_manifest_app_root_command()

int handle_manifest_app_root_command ( int argc,
char ** argv )
static

◆ handle_manifest_fixture_path_raw_command()

int handle_manifest_fixture_path_raw_command ( int argc,
char ** argv )
static

◆ handle_native_json_command()

int handle_native_json_command ( int argc,
char ** argv )

Definition at line 18390 of file native_json_runtime_ops.c.

References dispatch_native_json_command_entries(), handle_bundle_manifest_layer_for_slice_command(), handle_bundle_manifest_slice_order_command(), handle_db_postgresql_audit_event_count_command(), handle_db_postgresql_create_database_if_missing_command(), handle_db_postgresql_database_exists_command(), handle_db_postgresql_exec_command(), handle_db_postgresql_exec_file_command(), handle_db_postgresql_migration_applied_checksum_command(), handle_db_postgresql_migration_applied_count_command(), handle_db_postgresql_migration_applied_schema_version_command(), handle_db_postgresql_public_table_count_command(), handle_db_postgresql_query_value_command(), handle_db_postgresql_reconcile_migration_checksum_command(), handle_db_postgresql_table_exists_command(), handle_db_postgresql_table_row_count_command(), handle_db_sqlite_audit_event_count_command(), handle_db_sqlite_exec_command(), handle_db_sqlite_exec_file_command(), handle_db_sqlite_migration_applied_checksum_command(), handle_db_sqlite_migration_applied_count_command(), handle_db_sqlite_migration_applied_schema_version_command(), handle_db_sqlite_query_value_command(), handle_db_sqlite_reconcile_migration_checksum_command(), handle_db_sqlite_record_migration_command(), handle_db_sqlite_table_count_command(), handle_db_sqlite_table_exists_command(), handle_db_sqlite_table_row_count_command(), handle_dynamic_config_value_command(), handle_dynamic_ensure_business_media_tree_command(), handle_dynamic_file_signature_command(), handle_dynamic_media_disk_path_command(), handle_dynamic_multipart_extract_file_command(), handle_dynamic_multipart_extract_text_command(), handle_dynamic_multipart_filename_command(), handle_dynamic_postgresql_runtime_prepare_command(), handle_dynamic_postgresql_runtime_ready_command(), handle_dynamic_relational_backend_command(), handle_dynamic_relational_runtime_audit_count_command(), handle_dynamic_relational_runtime_export_json_command(), handle_dynamic_relational_runtime_import_state_command(), handle_dynamic_relational_sqlite_path_command(), handle_dynamic_remove_media_url_file_command(), handle_dynamic_safe_upload_filename_command(), handle_dynamic_sqlite_runtime_prepare_command(), handle_dynamic_sqlite_runtime_ready_command(), handle_dynamic_store_uploaded_media_command(), handle_error_envelope_command(), handle_file_compact_object_command(), handle_file_field_number_command(), handle_file_field_string_command(), handle_file_generated_surface_match_command(), handle_file_migration_backend_files_json_command(), handle_file_migration_backend_list_lines_command(), handle_file_migration_backend_record_json_command(), handle_file_migration_rows_lines_command(), handle_file_normalize_ucal_state_command(), handle_file_section_length_command(), handle_form_field_json_command(), handle_form_field_json_lines_command(), handle_form_options_csv_command(), handle_form_options_html_command(), handle_generated_surface_coerce_candidate_command(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_display_value_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_filter_controls_html_command(), handle_generated_surface_form_fields_html_command(), handle_generated_surface_list_columns_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_params_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_sort_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_manifest_app_root_command(), handle_manifest_fixture_path_raw_command(), handle_object_array_all_integers_command(), handle_object_array_item_json_lines_command(), handle_object_array_length_command(), handle_object_array_lines_command(), handle_object_build_command(), handle_object_field_number_command(), handle_object_field_string_command(), handle_object_field_text_command(), handle_object_merge_command(), handle_object_path_array_length_command(), handle_object_path_bool_command(), handle_object_path_json_command(), handle_object_path_number_command(), handle_object_path_string_command(), handle_object_relative_path_array_to_absolute_json_command(), handle_request_booking_options_json_from_form_command(), handle_request_checkbox_id_array_json_command(), handle_request_compact_json_command(), handle_request_compact_object_command(), handle_request_compact_object_strict_command(), handle_request_cookie_value_command(), handle_request_field_command(), handle_request_form_field_command(), handle_request_form_value_command(), handle_request_lines_to_booking_options_json_command(), handle_request_query_value_command(), handle_state_named_command(), handle_template_apply_base_path_command(), handle_template_declared_fragment_path_command(), handle_template_declared_page_contract_command(), handle_template_invite_accept_page_json_command(), handle_template_invite_created_page_json_command(), handle_template_layout_page_html_command(), handle_template_layout_page_json_command(), handle_template_login_page_json_command(), handle_template_password_reset_complete_page_json_command(), handle_template_password_reset_request_page_json_command(), handle_template_password_reset_sent_page_json_command(), handle_template_register_page_json_command(), handle_template_render_file_command(), handle_template_render_path_command(), handle_validation_add_field_error_command(), handle_validation_add_form_error_command(), handle_validation_empty_report_command(), handle_validation_error_envelope_command(), handle_validation_field_list_html_command(), handle_validation_has_errors_command(), and handle_validation_summary_text_command().

Referenced by main().

◆ handle_object_array_all_integers_command()

int handle_object_array_all_integers_command ( int argc,
char ** argv )
static

◆ handle_object_array_item_json_lines_command()

int handle_object_array_item_json_lines_command ( int argc,
char ** argv )
static

◆ handle_object_array_length_command()

int handle_object_array_length_command ( int argc,
char ** argv )
static

◆ handle_object_array_lines_command()

◆ handle_object_build_command()

◆ handle_object_field_number_command()

int handle_object_field_number_command ( int argc,
char ** argv )
static

◆ handle_object_field_string_command()

int handle_object_field_string_command ( int argc,
char ** argv )
static

◆ handle_object_field_text_command()

int handle_object_field_text_command ( int argc,
char ** argv )
static

◆ handle_object_merge_command()

◆ handle_object_path_array_length_command()

int handle_object_path_array_length_command ( int argc,
char ** argv )
static

◆ handle_object_path_bool_command()

int handle_object_path_bool_command ( int argc,
char ** argv )
static

◆ handle_object_path_json_command()

int handle_object_path_json_command ( int argc,
char ** argv )
static

◆ handle_object_path_number_command()

◆ handle_object_path_string_command()

int handle_object_path_string_command ( int argc,
char ** argv )
static

◆ handle_object_relative_path_array_to_absolute_json_command()

◆ handle_request_booking_options_json_from_form_command()

int handle_request_booking_options_json_from_form_command ( int argc,
char ** argv )
static

◆ handle_request_checkbox_id_array_json_command()

int handle_request_checkbox_id_array_json_command ( int argc,
char ** argv )
static

Definition at line 4313 of file native_json_runtime_ops.c.

References json_option_value_runtime().

Referenced by handle_native_json_command().

◆ handle_request_compact_json_command()

int handle_request_compact_json_command ( int argc,
char ** argv )
static

◆ handle_request_compact_object_command()

int handle_request_compact_object_command ( int argc,
char ** argv )
static

◆ handle_request_compact_object_strict_command()

int handle_request_compact_object_strict_command ( int argc,
char ** argv )
static

◆ handle_request_cookie_value_command()

int handle_request_cookie_value_command ( int argc,
char ** argv )
static

Extracts a cookie value from a Cookie header string.

Registered as: request cookie-value –cookie HEADER –name NAME

Definition at line 768 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_cookie_value().

Referenced by handle_native_json_command().

◆ handle_request_field_command()

◆ handle_request_form_field_command()

int handle_request_form_field_command ( int argc,
char ** argv )
static

Returns one request form field value from urlencoded or multipart request inputs.

Parameters
argcCommand argument count.
argvCommand argument vector.
Returns
Native status code.

Definition at line 746 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and request_form_field_value_dup_runtime().

Referenced by handle_native_json_command().

◆ handle_request_form_value_command()

int handle_request_form_value_command ( int argc,
char ** argv )
static

Extracts a value from a URL-encoded form body.

Registered as: request form-value –form-body BODY –key KEY

Definition at line 788 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_form_value().

Referenced by handle_native_json_command().

◆ handle_request_lines_to_booking_options_json_command()

◆ handle_request_query_value_command()

int handle_request_query_value_command ( int argc,
char ** argv )
static

Extracts a parameter value from a query string.

Registered as: request query-value –query QUERY –key KEY

Definition at line 808 of file native_json_runtime_ops.c.

References json_option_value_runtime(), and native_dynamic_query_value().

Referenced by handle_native_json_command().

◆ handle_state_event_stream_row_json_lines_command()

◆ handle_state_named_command()

int handle_state_named_command ( int argc,
char ** argv )
static

Definition at line 13047 of file native_json_runtime_ops.c.

References assign_technician_for_slot_runtime(), business_open_for_slot_runtime(), emit_active_tenant_ids_lines_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_business_admin_technician_rows_json_runtime(), emit_business_availability_lines_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_dashboard_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_business_technician_ids_lines_runtime(), emit_calendar_page_json_runtime(), emit_compact_json_value_runtime(), emit_explore_page_json_runtime(), emit_json_or_empty_runtime(), emit_long_runtime(), emit_manageable_business_cards_json_runtime(), emit_managed_appointments_json_runtime(), emit_object_string_field_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_public_business_cards_json_runtime(), emit_service_assigned_technician_ids_lines_runtime(), emit_service_book_form_page_json_runtime(), emit_service_edit_page_json_runtime(), emit_technician_appointments_lines_runtime(), emit_technician_availability_lines_runtime(), emit_technician_edit_page_json_runtime(), emit_text_line_runtime(), emit_user_appointments_json_runtime(), emit_user_membership_tenant_ids_json_runtime(), ensure_mut_array_field_runtime(), find_active_token_record_runtime(), find_mut_array_item_by_long_field_runtime(), handle_state_event_stream_row_json_lines_command(), handle_state_ucal_import_row_json_lines_command(), json_option_value_runtime(), load_root_from_text_runtime(), max_id_in_state_section_runtime(), merge_patch_into_mut_object_runtime(), native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_array(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), native_json_serialize_compact_dup(), normalized_payload_object_mut_runtime(), render_service_booking_options_editor_html_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_service_visual_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), state_array_runtime(), state_find_appointment_by_id_runtime(), state_find_booking_for_user_runtime(), state_find_business_availability_for_business_runtime(), state_find_business_by_id_runtime(), state_find_business_by_slug_runtime(), state_find_first_service_for_business_runtime(), state_find_google_calendar_connection_for_business_runtime(), state_find_service_by_id_runtime(), state_find_service_for_business_runtime(), state_find_technician_for_business_runtime(), state_find_user_by_email_runtime(), state_find_user_by_id_runtime(), state_find_user_by_username_runtime(), state_tenant_id_for_business_id_runtime(), state_tenant_id_for_business_slug_runtime(), state_tenant_id_for_service_id_runtime(), state_tenant_id_for_technician_id_runtime(), streq(), streq_casefold_runtime(), technician_booked_for_slot_runtime(), value_long_equals_runtime(), write_mutable_json_doc_runtime(), yyjson_arr_get(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_arr_size(), yyjson_doc_get_root(), yyjson_doc_mut_copy(), yyjson_equals_str(), yyjson_get_bool(), yyjson_get_len(), yyjson_is_arr(), yyjson_is_bool(), yyjson_is_null(), yyjson_is_obj(), yyjson_is_str(), yyjson_mut_arr_append(), yyjson_mut_arr_foreach, yyjson_mut_arr_get(), yyjson_mut_arr_remove(), yyjson_mut_arr_size(), yyjson_mut_bool(), yyjson_mut_doc_free(), yyjson_mut_doc_get_root(), yyjson_mut_doc_new(), yyjson_mut_int(), yyjson_mut_is_arr(), yyjson_mut_is_obj(), yyjson_mut_null(), yyjson_mut_obj(), yyjson_mut_obj_add(), yyjson_mut_obj_add_int(), yyjson_mut_obj_add_strcpy(), yyjson_mut_obj_get(), yyjson_mut_obj_put(), yyjson_mut_obj_remove_key(), yyjson_mut_strcpy(), yyjson_mut_val_write(), yyjson_val_mut_copy(), and YYJSON_WRITE_NOFLAG.

Referenced by handle_native_json_command().

◆ handle_state_ucal_import_row_json_lines_command()

◆ handle_template_apply_base_path_command()

int handle_template_apply_base_path_command ( int argc,
char ** argv )
static

◆ handle_template_declared_fragment_path_command()

int handle_template_declared_fragment_path_command ( int argc,
char ** argv )
static

Emits one UCAL declared fragment template path as text.

Parameters
argcCLI argument count after dispatch trimming.
argvCLI argument vector after dispatch trimming.
Returns
Process status code.

Definition at line 5187 of file native_json_runtime_ops.c.

References app_root_relative_path_dup_runtime(), emit_text_line_runtime(), json_option_value_runtime(), and ucal_declared_fragment_relative_path_runtime().

Referenced by handle_native_json_command().

◆ handle_template_declared_page_contract_command()

int handle_template_declared_page_contract_command ( int argc,
char ** argv )
static

Emits one UCAL declared page contract as JSON.

Parameters
argcCLI argument count after dispatch trimming.
argvCLI argument vector after dispatch trimming.
Returns
Process status code.

Definition at line 5124 of file native_json_runtime_ops.c.

References app_root_relative_path_dup_runtime(), declared_page_relative_path_dup_runtime(), emit_compact_json_mut_value_runtime(), json_option_value_runtime(), native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get_string_dup(), yyjson_doc_get_root(), yyjson_is_obj(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_obj(), and yyjson_mut_obj_add_strcpy().

Referenced by handle_native_json_command().

◆ handle_template_invite_accept_page_json_command()

◆ handle_template_invite_created_page_json_command()

int handle_template_invite_created_page_json_command ( int argc,
char ** argv )
static

◆ handle_template_layout_page_html_command()

◆ handle_template_layout_page_json_command()

◆ handle_template_login_page_json_command()

int handle_template_login_page_json_command ( int argc,
char ** argv )
static

◆ handle_template_password_reset_complete_page_json_command()

int handle_template_password_reset_complete_page_json_command ( int argc,
char ** argv )
static

◆ handle_template_password_reset_request_page_json_command()

int handle_template_password_reset_request_page_json_command ( int argc,
char ** argv )
static

◆ handle_template_password_reset_sent_page_json_command()

int handle_template_password_reset_sent_page_json_command ( int argc,
char ** argv )
static

◆ handle_template_register_page_json_command()

int handle_template_register_page_json_command ( int argc,
char ** argv )
static

◆ handle_template_render_file_command()

int handle_template_render_file_command ( int argc,
char ** argv )
static

◆ handle_template_render_path_command()

int handle_template_render_path_command ( int argc,
char ** argv )
static

◆ handle_validation_add_field_error_command()

int handle_validation_add_field_error_command ( int argc,
char ** argv )
static

◆ handle_validation_add_form_error_command()

int handle_validation_add_form_error_command ( int argc,
char ** argv )
static

◆ handle_validation_empty_report_command()

int handle_validation_empty_report_command ( int argc,
char ** argv )
static

◆ handle_validation_error_envelope_command()

int handle_validation_error_envelope_command ( int argc,
char ** argv )
static

◆ handle_validation_field_list_html_command()

◆ handle_validation_has_errors_command()

int handle_validation_has_errors_command ( int argc,
char ** argv )
static

◆ handle_validation_summary_text_command()

◆ hidden_next_input_html_dup_runtime()

char * hidden_next_input_html_dup_runtime ( const char * next_path)

Renders a hidden next-path <input> HTML, or an empty string.

Parameters
next_pathNext URL path, or NULL/empty for no input.
Returns
Newly allocated HTML string. Caller must free.

Definition at line 5352 of file native_json_runtime_ops.c.

References text_buffer_append_html_escaped_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), and text_buffer_take_runtime().

Referenced by handle_template_login_page_json_command(), handle_template_register_page_json_command(), login_page_params_json_dup_runtime(), and register_page_params_json_dup_runtime().

◆ html_escape_dup_runtime()

◆ html_escaped_dup_runtime()

◆ identifier_safe_runtime()

int identifier_safe_runtime ( const char * text)
static

Tests whether one identifier contains only letters, digits, and underscores.

Parameters
textCandidate identifier text.
Returns
Non-zero when the identifier is safe for quoted SQL identifier use.

Definition at line 3084 of file native_json_runtime_ops.c.

Referenced by handle_db_postgresql_create_database_if_missing_command(), handle_db_postgresql_database_exists_command(), handle_db_postgresql_table_exists_command(), handle_db_postgresql_table_row_count_command(), handle_db_sqlite_table_exists_command(), and handle_db_sqlite_table_row_count_command().

◆ join_base_relative_path_dup_runtime()

char * join_base_relative_path_dup_runtime ( const char * base_path,
const char * relative_path )

Joins a base path and a relative path into one string.

Parameters
base_pathBase directory path.
relative_pathRelative file path.
Returns
Newly allocated joined path, or NULL on failure. Caller must free.

Definition at line 4871 of file native_json_runtime_ops.c.

Referenced by generated_surface_fixture_path_dup_runtime(), handle_page_route(), handle_template_layout_page_html_command(), render_business_fragment_dup_runtime(), render_declared_page_response_with_headers_runtime(), and render_page_html_dup_runtime().

◆ json_array_contains_long_runtime()

◆ json_option_value_runtime()

const char * json_option_value_runtime ( int argc,
char ** argv,
const char * name )
static

Definition at line 29 of file native_json_runtime_ops.c.

References streq().

Referenced by handle_bundle_manifest_layer_for_slice_command(), handle_bundle_manifest_slice_order_command(), handle_db_postgresql_create_database_if_missing_command(), handle_db_postgresql_database_exists_command(), handle_db_postgresql_exec_command(), handle_db_postgresql_exec_file_command(), handle_db_postgresql_migration_applied_checksum_command(), handle_db_postgresql_migration_applied_count_command(), handle_db_postgresql_migration_applied_schema_version_command(), handle_db_postgresql_query_value_command(), handle_db_postgresql_reconcile_migration_checksum_command(), handle_db_postgresql_table_exists_command(), handle_db_postgresql_table_row_count_command(), handle_db_sqlite_audit_event_count_command(), handle_db_sqlite_exec_command(), handle_db_sqlite_exec_file_command(), handle_db_sqlite_migration_applied_checksum_command(), handle_db_sqlite_migration_applied_count_command(), handle_db_sqlite_migration_applied_schema_version_command(), handle_db_sqlite_query_value_command(), handle_db_sqlite_reconcile_migration_checksum_command(), handle_db_sqlite_record_migration_command(), handle_db_sqlite_table_count_command(), handle_db_sqlite_table_exists_command(), handle_db_sqlite_table_row_count_command(), handle_dynamic_config_value_command(), handle_dynamic_ensure_business_media_tree_command(), handle_dynamic_file_signature_command(), handle_dynamic_media_disk_path_command(), handle_dynamic_multipart_extract_file_command(), handle_dynamic_multipart_extract_text_command(), handle_dynamic_multipart_filename_command(), handle_dynamic_postgresql_runtime_prepare_command(), handle_dynamic_postgresql_runtime_ready_command(), handle_dynamic_relational_backend_command(), handle_dynamic_relational_runtime_audit_count_command(), handle_dynamic_relational_runtime_export_json_command(), handle_dynamic_relational_runtime_import_state_command(), handle_dynamic_relational_sqlite_path_command(), handle_dynamic_remove_media_url_file_command(), handle_dynamic_safe_upload_filename_command(), handle_dynamic_sqlite_runtime_prepare_command(), handle_dynamic_sqlite_runtime_ready_command(), handle_dynamic_store_uploaded_media_command(), handle_error_envelope_command(), handle_file_compact_object_command(), handle_file_field_number_command(), handle_file_field_string_command(), handle_file_generated_surface_match_command(), handle_file_migration_backend_files_json_command(), handle_file_migration_backend_list_lines_command(), handle_file_migration_backend_record_json_command(), handle_file_migration_rows_lines_command(), handle_file_normalize_ucal_state_command(), handle_file_section_length_command(), handle_form_field_json_command(), handle_form_field_json_lines_command(), handle_form_options_csv_command(), handle_form_options_html_command(), handle_generated_surface_coerce_candidate_command(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_display_value_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_filter_controls_html_command(), handle_generated_surface_form_fields_html_command(), handle_generated_surface_list_columns_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_params_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_sort_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_manifest_app_root_command(), handle_manifest_fixture_path_raw_command(), handle_object_array_all_integers_command(), handle_object_array_item_json_lines_command(), handle_object_array_length_command(), handle_object_array_lines_command(), handle_object_field_number_command(), handle_object_field_string_command(), handle_object_field_text_command(), handle_object_merge_command(), handle_object_path_array_length_command(), handle_object_path_bool_command(), handle_object_path_json_command(), handle_object_path_number_command(), handle_object_path_string_command(), handle_object_relative_path_array_to_absolute_json_command(), handle_request_booking_options_json_from_form_command(), handle_request_checkbox_id_array_json_command(), handle_request_compact_json_command(), handle_request_compact_object_command(), handle_request_compact_object_strict_command(), handle_request_cookie_value_command(), handle_request_field_command(), handle_request_form_field_command(), handle_request_form_value_command(), handle_request_lines_to_booking_options_json_command(), handle_request_query_value_command(), handle_state_named_command(), handle_template_apply_base_path_command(), handle_template_declared_fragment_path_command(), handle_template_declared_page_contract_command(), handle_template_invite_accept_page_json_command(), handle_template_invite_created_page_json_command(), handle_template_layout_page_html_command(), handle_template_layout_page_json_command(), handle_template_login_page_json_command(), handle_template_password_reset_complete_page_json_command(), handle_template_password_reset_request_page_json_command(), handle_template_password_reset_sent_page_json_command(), handle_template_register_page_json_command(), handle_template_render_file_command(), handle_template_render_path_command(), handle_validation_add_field_error_command(), handle_validation_add_form_error_command(), handle_validation_empty_report_command(), handle_validation_error_envelope_command(), handle_validation_field_list_html_command(), handle_validation_has_errors_command(), handle_validation_summary_text_command(), and load_cli_postgresql_runtime_config().

◆ json_value_equals_text_runtime()

int json_value_equals_text_runtime ( yyjson_val * value,
const char * expected )
static

◆ json_value_list_append_runtime()

◆ json_value_list_free_runtime()

◆ json_value_tostring_dup_runtime()

◆ json_value_truthy_runtime()

◆ language_options_html_dup_runtime()

◆ load_cli_postgresql_runtime_config()

int load_cli_postgresql_runtime_config ( int argc,
char ** argv,
DynamicPostgresqlRuntimeConfig * config )
static

◆ load_dynamic_postgresql_runtime_config()

◆ load_native_libpq_api_runtime()

int load_native_libpq_api_runtime ( NativeLibpqApi * api)
static

Loads the native libpq client ABI from cached image prefixes or standard library names.

Parameters
apiReceives resolved function pointers.
Returns
Non-zero on success, otherwise 0.

Definition at line 2665 of file native_json_runtime_ops.c.

References NativeLibpqApi::handle, open_libpq_handle_candidate_runtime(), path_exists(), path_join(), NativeLibpqApi::PQclear, NativeLibpqApi::PQconnectdb, NativeLibpqApi::PQerrorMessage, NativeLibpqApi::PQexec, NativeLibpqApi::PQfinish, NativeLibpqApi::PQgetvalue, NativeLibpqApi::PQnfields, NativeLibpqApi::PQntuples, NativeLibpqApi::PQresultStatus, and NativeLibpqApi::PQstatus.

Referenced by run_postgresql_sql_capture_runtime().

◆ load_root_from_text_runtime()

yyjson_val * load_root_from_text_runtime ( const char * text,
yyjson_doc ** doc_out )

Parses JSON text into a yyjson_val root.

Parameters
textNUL-terminated JSON text.
doc_outOutput pointer to the parsed document (must be freed by caller with native_json_doc_free()).
Returns
Root value, or NULL on parse failure.

Definition at line 338 of file native_json_runtime_ops.c.

References native_json_doc_free(), native_json_doc_load_text(), and yyjson_doc_get_root().

Referenced by append_validation_error_runtime(), handle_generated_surface_coerce_candidate_command(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_display_value_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_filter_controls_html_command(), handle_generated_surface_form_fields_html_command(), handle_generated_surface_list_columns_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_params_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_sort_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_object_array_all_integers_command(), handle_object_array_item_json_lines_command(), handle_object_array_length_command(), handle_object_array_lines_command(), handle_object_build_command(), handle_object_field_number_command(), handle_object_field_string_command(), handle_object_field_text_command(), handle_object_merge_command(), handle_object_path_array_length_command(), handle_object_path_bool_command(), handle_object_path_json_command(), handle_object_path_number_command(), handle_object_path_string_command(), handle_object_relative_path_array_to_absolute_json_command(), handle_page_route(), handle_request_compact_json_command(), handle_request_compact_object_command(), handle_request_compact_object_strict_command(), handle_request_field_command(), handle_state_named_command(), handle_template_layout_page_html_command(), handle_template_render_file_command(), handle_template_render_path_command(), handle_validation_error_envelope_command(), handle_validation_field_list_html_command(), handle_validation_has_errors_command(), handle_validation_summary_text_command(), native_dynamic_runtime_handle_request(), normalized_payload_object_mut_runtime(), render_business_fragment_from_doc_dup_runtime(), render_declared_page_response_with_headers_runtime(), and render_page_html_dup_runtime().

◆ long_from_value_runtime()

◆ long_in_array_runtime()

int long_in_array_runtime ( yyjson_val * array_value,
long expected_value )
static

◆ max_id_in_state_section_runtime()

long max_id_in_state_section_runtime ( yyjson_val * root,
const char * section_name )
static

◆ memmem_runtime()

const unsigned char * memmem_runtime ( const unsigned char * haystack,
size_t haystack_len,
const unsigned char * needle,
size_t needle_len )
static

Finds the first binary needle occurrence within a byte range.

Parameters
haystackBytes to scan.
haystack_lenAvailable byte count.
needleNeedle bytes.
needle_lenNeedle byte count.
Returns
Pointer to the first match, or NULL when absent.

Definition at line 496 of file native_json_runtime_ops.c.

Referenced by multipart_find_part_runtime().

◆ merge_patch_into_mut_object_runtime()

◆ migration_backend_record_runtime()

◆ migration_expected_checksum_dup_runtime()

◆ migration_record_by_id_runtime()

yyjson_val * migration_record_by_id_runtime ( yyjson_val * root,
const char * migration_id )
static

◆ month_name_runtime()

const char * month_name_runtime ( int month)
static

◆ month_shift_runtime()

void month_shift_runtime ( int year,
int month,
int shift,
int * out_year,
int * out_month )
static

◆ multipart_boundary_dup_runtime()

char * multipart_boundary_dup_runtime ( const char * content_type)
static

Extracts the multipart boundary token from a content type value.

Parameters
content_typeMultipart content type header value.
Returns
Newly allocated boundary token, or NULL when the header has no boundary.

Definition at line 514 of file native_json_runtime_ops.c.

References dup_range().

Referenced by multipart_find_part_runtime().

◆ multipart_find_part_runtime()

int multipart_find_part_runtime ( const unsigned char * body,
size_t body_len,
const char * content_type,
const char * field_name,
char ** out_text,
char ** out_filename,
const unsigned char ** out_content_start,
size_t * out_content_len )
static

Finds one multipart part by field name and optionally returns its filename and content range.

Parameters
bodyMultipart request body bytes.
body_lenMultipart request body length.
content_typeMultipart content type header value.
field_nameTarget field name.
out_textReceives owned text content when requested.
out_filenameReceives owned uploaded filename when requested.
out_content_startReceives the part content start within body when requested.
out_content_lenReceives the part content length when requested.
Returns
1 when a matching part is found, otherwise 0.

Definition at line 579 of file native_json_runtime_ops.c.

References dup_range(), memmem_runtime(), multipart_boundary_dup_runtime(), multipart_header_param_dup_runtime(), and streq().

Referenced by request_form_field_value_dup_runtime().

◆ multipart_header_param_dup_runtime()

char * multipart_header_param_dup_runtime ( const char * headers_text,
const char * key )
static

Extracts one quoted Content-Disposition parameter from multipart headers.

Parameters
headers_textNUL-terminated part headers.
keyParameter name such as name or filename.
Returns
Newly allocated parameter value, or NULL when absent.

Definition at line 546 of file native_json_runtime_ops.c.

References dup_range().

Referenced by multipart_find_part_runtime().

◆ normalized_payload_object_mut_runtime()

yyjson_mut_val * normalized_payload_object_mut_runtime ( yyjson_mut_doc * doc,
const char * payload_json )
static

◆ object_value_at_path_runtime()

◆ open_libpq_handle_candidate_runtime()

void * open_libpq_handle_candidate_runtime ( const char * path)
static

Attempts to open one libpq shared library path.

Parameters
pathCandidate shared library path.
Returns
Dynamic loader handle, or NULL on failure.

Definition at line 2652 of file native_json_runtime_ops.c.

Referenced by load_native_libpq_api_runtime().

◆ parse_hhmm_minutes_runtime()

int parse_hhmm_minutes_runtime ( const char * value,
int * minutes_out )
static

◆ parse_ymd_runtime()

int parse_ymd_runtime ( const char * date_value,
int * year_out,
int * month_out,
int * day_out )
static

◆ payload_first_long_runtime()

long payload_first_long_runtime ( yyjson_val * payload,
const char ** fields,
size_t field_count )
static

◆ payload_first_string_dup_runtime()

char * payload_first_string_dup_runtime ( yyjson_val * payload,
const char ** fields,
size_t field_count )
static

◆ postgresql_apply_file_list_runtime()

int postgresql_apply_file_list_runtime ( const DynamicPostgresqlRuntimeConfig * config,
const char * app_root,
yyjson_val * list )
static

Applies one declarative SQL file list through the native PostgreSQL driver.

Parameters
configResolved PostgreSQL runtime connection settings.
app_rootApp root directory used to resolve relative SQL file paths.
listDeclarative SQL file list array.
Returns
Native status code.

Definition at line 2366 of file native_json_runtime_ops.c.

References read_file_text(), resolve_relative_to(), run_postgresql_sql_capture_runtime(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_get_str(), and yyjson_is_str().

◆ postgresql_conninfo_dup_runtime()

◆ profile_render_page_params_json_dup_runtime()

char * profile_render_page_params_json_dup_runtime ( const char * state_path,
long user_id,
const char * app_root,
const char * payment_preference_options_html )

Builds rendered profile page params JSON from runtime state.

Uses the native state model plus declarative profile fragments to produce the parameter object expected by templates/profile/profile.body.html.

Parameters
state_pathOn-disk runtime state JSON path.
user_idSigned-in user id.
app_rootUCAL app root used to locate fragment templates.
payment_preference_options_htmlPre-rendered payment preference options.
Returns
Newly allocated compact JSON string, or NULL on failure. Caller must free.

Definition at line 10148 of file native_json_runtime_ops.c.

References TextBufferRuntime::length, native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), render_business_fragment_from_doc_dup_runtime(), state_array_runtime(), state_find_business_by_id_runtime(), state_find_user_by_id_runtime(), TextBufferRuntime::text, text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), value_long_equals_runtime(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_doc_get_root(), yyjson_is_obj(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_strcpy(), yyjson_mut_write(), and YYJSON_WRITE_NOFLAG.

Referenced by resolve_declared_page_params_json_runtime().

◆ query_value_decoded_dup_runtime()

◆ read_file_bytes_dup_runtime()

unsigned char * read_file_bytes_dup_runtime ( const char * path,
size_t * out_size )

Reads one file into an owned binary buffer and appends a trailing NUL byte for text helpers.

Reads the full content of a binary file into a heap-allocated buffer.

Parameters
pathFile path to load.
out_sizeReceives the byte count excluding the trailing NUL.
Returns
Newly allocated buffer, or NULL on failure.

Reads one file into an owned binary buffer and appends a trailing NUL byte for text helpers.

Parameters
pathFile path to read.
out_sizeReceives the byte count (may be NULL).
Returns
Newly allocated buffer with NUL terminator, or NULL on failure.

Definition at line 410 of file native_json_runtime_ops.c.

Referenced by handle_dynamic_file_signature_command(), handle_dynamic_multipart_extract_file_command(), handle_dynamic_multipart_extract_text_command(), handle_dynamic_multipart_filename_command(), native_dynamic_relational_file_signature_dup(), request_body_bytes_dup_runtime(), request_form_field_value_dup_runtime(), and store_uploaded_media().

◆ render_business_admin_empty_state_dup_runtime()

char * render_business_admin_empty_state_dup_runtime ( const char * app_root,
const char * message )
static

◆ render_business_dashboard_cards_html_dup_runtime()

◆ render_business_fragment_dup_runtime()

char * render_business_fragment_dup_runtime ( const char * app_root,
const char * fragment_name,
yyjson_val * params_root )
static

◆ render_business_fragment_from_doc_dup_runtime()

◆ render_file_template_dup_runtime()

char * render_file_template_dup_runtime ( const char * template_file,
yyjson_val * params_root )

Reads a template file and renders it with JSON parameter substitution.

Parameters
template_fileFile-system path to the template.
params_rootJSON object providing values for each placeholder.
Returns
Newly allocated rendered string, or NULL on failure. Caller must free.

Definition at line 4885 of file native_json_runtime_ops.c.

References read_file_text(), render_template_text_dup_runtime(), and yyjson_is_obj().

Referenced by handle_page_route(), handle_template_layout_page_html_command(), render_business_fragment_dup_runtime(), render_declared_page_response_with_headers_runtime(), and render_page_html_dup_runtime().

◆ render_page_html_dup_runtime()

char * render_page_html_dup_runtime ( const char * app_root,
const char * base_path,
const char * layout_id,
const char * title,
const char * body,
const char * current_lang,
const char * current_request_target,
int has_user,
int managed_business_count )

Builds the nav context and renders a full layout page.

Constructs the navigation HTML (language selector, login/logout links, profile links, etc.) and renders the layout template with the given body HTML embedded. Applies base-path scoping to the result.

Parameters
app_rootApp root directory (for finding templates/layout/).
base_pathURL base path for scoping, or NULL.
layout_idLayout identifier (e.g. "account_shell").
titlePage title.
bodyAlready-rendered body HTML.
current_langCurrent language code (e.g. "en"), or NULL.
current_request_targetCurrent request path for nav highlighting.
has_userNon-zero when a user is authenticated.
managed_business_countNumber of businesses the user manages.
Returns
Newly allocated full page HTML, or NULL on failure. Caller must free.

Definition at line 5418 of file native_json_runtime_ops.c.

References apply_base_path_html_dup_runtime(), html_escaped_dup_runtime(), join_base_relative_path_dup_runtime(), language_options_html_dup_runtime(), load_root_from_text_runtime(), native_json_doc_free(), render_file_template_dup_runtime(), streq(), TextBufferRuntime::text, text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_strcpy(), yyjson_mut_write(), and YYJSON_WRITE_NOFLAG.

Referenced by handle_page_route(), and render_declared_page_response_with_headers_runtime().

◆ render_path_template_text_dup_runtime()

char * render_path_template_text_dup_runtime ( const char * template_text,
yyjson_val * params_root )

Renders one path-oriented template text string with JSON substitution.

This variant is for internal route or action path assembly rather than HTML body rendering. Plain placeholders are validated as path references by default while still accepting the explicit {path:key} and {url:key} forms.

Parameters
template_textRaw path template string with placeholder expressions.
params_rootJSON object providing values for each key.
Returns
Newly allocated rendered string, or NULL on failure. Caller must free.

Definition at line 4867 of file native_json_runtime_ops.c.

References render_template_text_with_default_kind_dup_runtime(), and TEMPLATE_PLACEHOLDER_PATH_RUNTIME.

Referenced by generated_surface_operation_path_dup_runtime(), handle_generated_surface_manage_page_json_command(), and handle_template_render_path_command().

◆ render_service_booking_options_editor_html_dup_runtime()

◆ render_service_sort_order_options_html_dup_runtime()

◆ render_service_visual_html_dup_runtime()

◆ render_technician_checkboxes_html_dup_runtime()

◆ render_template_text_dup_runtime()

char * render_template_text_dup_runtime ( const char * template_text,
yyjson_val * params_root )

Renders one HTML template text string with JSON parameter substitution.

Plain {key} placeholders render into HTML text context and are escaped by default. Explicit prefixes are available for other trusted contexts:

  • {html:key} inserts a trusted raw HTML fragment
  • {path:key} inserts a validated path/reference for URL attributes
  • {url:key} inserts a validated URL/reference for URL attributes
Parameters
template_textRaw template string with placeholder expressions.
params_rootJSON object providing values for each key.
Returns
Newly allocated rendered string, or NULL on failure. Caller must free.

Definition at line 4863 of file native_json_runtime_ops.c.

References render_template_text_with_default_kind_dup_runtime(), and TEMPLATE_PLACEHOLDER_TEXT_RUNTIME.

Referenced by emit_template_text_runtime(), and render_file_template_dup_runtime().

◆ render_template_text_with_default_kind_dup_runtime()

char * render_template_text_with_default_kind_dup_runtime ( const char * template_text,
yyjson_val * params_root,
TemplatePlaceholderKindRuntime default_kind )
static

Renders one template string using one caller-selected default placeholder mode.

Parameters
template_textRaw template string with placeholders.
params_rootJSON object providing replacement values.
default_kindDefault rendering mode for unprefixed placeholders.
Returns
Newly allocated rendered text, or NULL on failure.

Definition at line 4813 of file native_json_runtime_ops.c.

References dup_range(), native_json_obj_get(), template_placeholder_kind_runtime(), TEMPLATE_PLACEHOLDER_TEXT_RUNTIME, text_buffer_append_char_runtime(), text_buffer_append_template_value_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), and yyjson_is_obj().

Referenced by render_path_template_text_dup_runtime(), and render_template_text_dup_runtime().

◆ request_form_field_value_dup_runtime()

char * request_form_field_value_dup_runtime ( const char * content_type,
const char * form_body,
const char * body_path,
const char * field_name )
static

Resolves one request form field from urlencoded or multipart request inputs.

Parameters
content_typeRequest content type header value.
form_bodyInline request body text when available.
body_pathOptional request body file path.
field_nameField name to extract.
Returns
Newly allocated field value, or NULL when absent.

Definition at line 712 of file native_json_runtime_ops.c.

References multipart_find_part_runtime(), path_exists(), query_value_decoded_dup_runtime(), read_file_bytes_dup_runtime(), and read_file_text().

Referenced by handle_request_booking_options_json_from_form_command(), and handle_request_form_field_command().

◆ resolve_command_path_runtime()

char * resolve_command_path_runtime ( const char * command)
static

Tests whether an executable command name resolves through PATH.

Parameters
commandCommand name to resolve.
Returns
Non-zero when the command is available, otherwise 0.

Definition at line 2005 of file native_json_runtime_ops.c.

References path_join().

Referenced by capture_checksum_output_runtime(), and command_exists_in_path_runtime().

◆ resolve_dynamic_config_value_runtime()

char * resolve_dynamic_config_value_runtime ( const char * conf_path,
const char * key,
const char * raw_value )
static

Resolves one raw dynamic config value against its owning config file when needed.

Parameters
conf_pathPath to the config file that supplied the value.
keyConfig key name.
raw_valueRaw config value.
Returns
Newly allocated resolved value, or NULL when no value is available.

Definition at line 1802 of file native_json_runtime_ops.c.

References dynamic_config_key_is_path_runtime(), and resolve_conf_relative_path_native().

Referenced by dynamic_merged_config_value_runtime().

◆ resource_kind_from_resource_id_runtime()

char * resource_kind_from_resource_id_runtime ( const char * resource_id)
static

Definition at line 12729 of file native_json_runtime_ops.c.

References dup_range().

Referenced by collect_event_stream_row_runtime().

◆ route_template_match_into_mut_obj_runtime()

int route_template_match_into_mut_obj_runtime ( yyjson_mut_doc * doc,
const char * template_path,
const char * request_path,
yyjson_mut_val ** out_params )
static

◆ run_postgresql_sql_capture_runtime()

int run_postgresql_sql_capture_runtime ( const DynamicPostgresqlRuntimeConfig * config,
const char * sql_text,
int at_output,
char ** output_out )
static

Runs one PostgreSQL SQL text payload through the native libpq driver.

Parameters
configResolved PostgreSQL runtime connection settings.
sql_textSQL text to execute.
at_outputNon-zero to request tuple capture output.
output_outReceives captured output when requested.
Returns
Native status code.

Definition at line 2823 of file native_json_runtime_ops.c.

References capture_postgresql_result_output_runtime(), free_native_libpq_api_runtime(), load_native_libpq_api_runtime(), PHAROS_CONN_STATUS_OK_RUNTIME, PHAROS_PGRES_COMMAND_OK_RUNTIME, PHAROS_PGRES_SINGLE_TUPLE_RUNTIME, PHAROS_PGRES_TUPLES_OK_RUNTIME, postgresql_conninfo_dup_runtime(), NativeLibpqApi::PQclear, NativeLibpqApi::PQconnectdb, NativeLibpqApi::PQexec, NativeLibpqApi::PQfinish, NativeLibpqApi::PQresultStatus, and NativeLibpqApi::PQstatus.

Referenced by dynamic_relational_runtime_audit_count_dup_runtime(), dynamic_relational_runtime_export_json_dup_runtime(), dynamic_relational_runtime_import_state_runtime(), handle_db_postgresql_audit_event_count_command(), handle_db_postgresql_create_database_if_missing_command(), handle_db_postgresql_database_exists_command(), handle_db_postgresql_exec_command(), handle_db_postgresql_exec_file_command(), handle_db_postgresql_migration_applied_checksum_command(), handle_db_postgresql_migration_applied_count_command(), handle_db_postgresql_migration_applied_schema_version_command(), handle_db_postgresql_public_table_count_command(), handle_db_postgresql_query_value_command(), handle_db_postgresql_reconcile_migration_checksum_command(), handle_db_postgresql_table_exists_command(), handle_db_postgresql_table_row_count_command(), and postgresql_apply_file_list_runtime().

◆ run_sqlite_command_runtime()

int run_sqlite_command_runtime ( const char * sqlite_path,
const char * sql_text,
char ** output_out )
static

◆ runtime_state_placeholder_sql_dup_runtime()

char * runtime_state_placeholder_sql_dup_runtime ( const char * sql_template,
const char * escaped_state_json )
static

Replaces the canonical runtime-state placeholder inside one declarative SQL template.

Parameters
sql_templateDeclarative SQL template text.
escaped_state_jsonSQL-literal escaped canonical state JSON.
Returns
Newly allocated SQL text, or NULL on failure.

Definition at line 2875 of file native_json_runtime_ops.c.

Referenced by dynamic_relational_runtime_import_state_runtime().

◆ seen_long_pair_runtime()

int seen_long_pair_runtime ( long * values,
size_t count,
long first,
long second )
static

◆ service_abbreviation_dup_runtime()

char * service_abbreviation_dup_runtime ( const char * name)
static

Definition at line 8421 of file native_json_runtime_ops.c.

Referenced by render_service_visual_html_dup_runtime().

◆ service_badge_color_runtime()

const char * service_badge_color_runtime ( const char * name)
static

Definition at line 8456 of file native_json_runtime_ops.c.

Referenced by render_service_visual_html_dup_runtime().

◆ service_book_form_page_params_json_dup_runtime()

char * service_book_form_page_params_json_dup_runtime ( const char * state_path,
const char * business_slug,
long service_id,
const char * app_root,
const char * error_message )

Builds rendered service-book-form page params JSON from runtime state.

Uses the native state model plus declarative booking fragments to produce the parameter object expected by templates/businesses/service_book_form.body.html.

Parameters
state_pathOn-disk runtime state JSON path.
business_slugBusiness slug from the matched route.
service_idService id from the matched route.
app_rootUCAL app root used to locate fragment templates.
error_messageOptional error text to render into the form.
Returns
Newly allocated compact JSON string, or NULL on failure. Caller must free.

Definition at line 8655 of file native_json_runtime_ops.c.

References native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_array(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), render_service_visual_html_dup_runtime(), service_media_url_dup_runtime(), state_find_business_by_slug_runtime(), state_find_service_by_id_runtime(), streq(), TextBufferRuntime::text, text_buffer_append_format_runtime(), text_buffer_append_html_escaped_runtime(), text_buffer_append_text_runtime(), text_buffer_free_runtime(), text_buffer_take_runtime(), value_long_equals_runtime(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_doc_get_root(), yyjson_get_str(), yyjson_is_str(), yyjson_mut_doc_free(), yyjson_mut_doc_new(), yyjson_mut_doc_set_root(), yyjson_mut_obj(), yyjson_mut_obj_add_int(), yyjson_mut_obj_add_strcpy(), yyjson_mut_write(), and YYJSON_WRITE_NOFLAG.

Referenced by resolve_declared_page_params_json_runtime().

◆ service_media_url_dup_runtime()

◆ sql_literal_escape_dup_runtime()

◆ sqlite_apply_file_list_runtime()

int sqlite_apply_file_list_runtime ( const char * sqlite_path,
const char * app_root,
yyjson_val * list )
static

◆ sqlite_capture_callback_runtime()

int sqlite_capture_callback_runtime ( void * context_void,
int column_count,
char ** column_values,
char ** column_names )
static

Captures sqlite result rows into the shared text buffer using CLI-compatible separators.

Parameters
context_voidCapture buffer context.
column_countResult column count for the current row.
column_valuesResult column text values.
column_namesUnused sqlite column names.
Returns
0 to continue sqlite execution.

Definition at line 2056 of file native_json_runtime_ops.c.

References SqliteCaptureRuntime::buffer, SqliteCaptureRuntime::row_count, and text_buffer_append_text_runtime().

Referenced by run_sqlite_command_runtime().

◆ sqlite_query_value_runtime()

◆ state_array_runtime()

yyjson_val * state_array_runtime ( yyjson_val * root,
const char * key )
static

Definition at line 6200 of file native_json_runtime_ops.c.

References native_json_obj_get_array().

Referenced by append_generated_surface_relation_checkboxes_html_runtime(), appointments_render_page_params_json_dup_runtime(), assign_technician_for_slot_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), business_open_for_slot_runtime(), diagnostics_render_page_params_json_dup_runtime(), emit_active_tenant_ids_lines_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_business_admin_technician_rows_json_runtime(), emit_business_availability_lines_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_business_technician_ids_lines_runtime(), emit_calendar_page_json_runtime(), emit_explore_page_json_runtime(), emit_manageable_business_cards_json_runtime(), emit_managed_appointments_json_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_public_business_cards_json_runtime(), emit_service_assigned_technician_ids_lines_runtime(), emit_sorted_section_lines_runtime(), emit_technician_appointments_lines_runtime(), emit_technician_availability_lines_runtime(), emit_user_appointments_json_runtime(), emit_user_membership_tenant_ids_json_runtime(), explore_render_page_params_json_dup_runtime(), handle_generated_surface_default_candidate_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_validation_report_command(), handle_state_event_stream_row_json_lines_command(), handle_state_named_command(), handle_state_ucal_import_row_json_lines_command(), profile_render_page_params_json_dup_runtime(), render_business_dashboard_cards_html_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), state_find_appointment_by_id_runtime(), state_find_booking_for_user_runtime(), state_find_business_availability_for_business_runtime(), state_find_business_by_id_runtime(), state_find_business_by_slug_runtime(), state_find_first_service_for_business_runtime(), state_find_google_calendar_connection_for_business_runtime(), state_find_service_by_id_runtime(), state_find_service_for_business_runtime(), state_find_technician_by_id_runtime(), state_find_technician_for_business_runtime(), state_find_user_by_email_runtime(), state_find_user_by_id_runtime(), state_find_user_by_username_runtime(), state_tenant_id_for_business_id_runtime(), state_tenant_id_for_business_slug_runtime(), surface_find_record_by_string_field_runtime(), technician_booked_for_slot_runtime(), and user_manages_business_runtime().

◆ state_find_appointment_by_id_runtime()

yyjson_val * state_find_appointment_by_id_runtime ( yyjson_val * root,
long appointment_id )
static

◆ state_find_booking_for_user_runtime()

yyjson_val * state_find_booking_for_user_runtime ( yyjson_val * root,
long booking_id,
long user_id )
static

◆ state_find_business_availability_for_business_runtime()

yyjson_val * state_find_business_availability_for_business_runtime ( yyjson_val * root,
long availability_id,
long business_id )
static

◆ state_find_business_by_id_runtime()

◆ state_find_business_by_slug_runtime()

◆ state_find_first_service_for_business_runtime()

yyjson_val * state_find_first_service_for_business_runtime ( yyjson_val * root,
long business_id )
static

◆ state_find_google_calendar_connection_for_business_runtime()

yyjson_val * state_find_google_calendar_connection_for_business_runtime ( yyjson_val * root,
long business_id )
static

◆ state_find_service_by_id_runtime()

◆ state_find_service_for_business_runtime()

yyjson_val * state_find_service_for_business_runtime ( yyjson_val * root,
long service_id,
long business_id )
static

◆ state_find_technician_by_id_runtime()

yyjson_val * state_find_technician_by_id_runtime ( yyjson_val * root,
long technician_id )
static

◆ state_find_technician_for_business_runtime()

◆ state_find_user_by_email_runtime()

◆ state_find_user_by_id_runtime()

◆ state_find_user_by_username_runtime()

yyjson_val * state_find_user_by_username_runtime ( yyjson_val * root,
const char * username )
static

◆ state_tenant_id_for_business_id_runtime()

◆ state_tenant_id_for_business_slug_runtime()

◆ state_tenant_id_for_service_id_runtime()

long state_tenant_id_for_service_id_runtime ( yyjson_val * root,
long service_id )
static

◆ state_tenant_id_for_technician_id_runtime()

long state_tenant_id_for_technician_id_runtime ( yyjson_val * root,
long technician_id )
static

◆ streq_casefold_runtime()

int streq_casefold_runtime ( const char * left,
const char * right )
static

◆ surface_build_active_filters_runtime()

◆ surface_build_sort_config_runtime()

◆ surface_compare_sort_values_runtime()

int surface_compare_sort_values_runtime ( yyjson_val * left_item,
yyjson_val * right_item,
const char * field_name,
const char * type_name )
static

◆ surface_context_match_runtime()

◆ surface_filter_item_runtime()

◆ surface_find_by_id_runtime()

yyjson_val * surface_find_by_id_runtime ( yyjson_val * root,
const char * surface_id )
static

◆ surface_find_form_runtime()

◆ surface_find_record_by_string_field_runtime()

yyjson_val * surface_find_record_by_string_field_runtime ( yyjson_val * root,
const char * collection_name,
const char * field_name,
const char * expected_value )
static

◆ surface_sort_items_runtime()

◆ technician_booked_for_slot_runtime()

◆ template_path_reference_allowed_runtime()

int template_path_reference_allowed_runtime ( const char * text)
static

Tests whether one candidate path reference is safe for HTML URL attributes.

Parameters
textCandidate path or path-segment text.
Returns
1 when the value is allowed, else 0.

Definition at line 4691 of file native_json_runtime_ops.c.

References template_reference_contains_unsafe_char_runtime(), and template_reference_has_scheme_runtime().

Referenced by text_buffer_append_template_value_runtime().

◆ template_placeholder_kind_runtime()

TemplatePlaceholderKindRuntime template_placeholder_kind_runtime ( const char * placeholder_name,
const char ** param_name )
static

Parses one placeholder token into its rendering mode and JSON key name.

Parameters
placeholder_nameRaw placeholder text between braces.
param_nameReceives the effective JSON key name.
Returns
Parsed placeholder rendering mode.

Definition at line 4773 of file native_json_runtime_ops.c.

References TEMPLATE_PLACEHOLDER_HTML_RUNTIME, TEMPLATE_PLACEHOLDER_PATH_RUNTIME, TEMPLATE_PLACEHOLDER_TEXT_RUNTIME, and TEMPLATE_PLACEHOLDER_URL_RUNTIME.

Referenced by render_template_text_with_default_kind_dup_runtime().

◆ template_reference_contains_unsafe_char_runtime()

int template_reference_contains_unsafe_char_runtime ( const char * text)
static

Checks whether a reference candidate contains unsafe control bytes.

Parameters
textCandidate URL or path reference text.
Returns
1 when an unsafe control byte is present, else 0.

Definition at line 4635 of file native_json_runtime_ops.c.

Referenced by template_path_reference_allowed_runtime(), and template_url_reference_allowed_runtime().

◆ template_reference_has_allowed_url_scheme_runtime()

int template_reference_has_allowed_url_scheme_runtime ( const char * text)
static

Tests whether a reference uses one permitted external URL scheme.

Parameters
textCandidate URL reference text.
Returns
1 when the scheme is explicitly allowed, else 0.

Definition at line 4676 of file native_json_runtime_ops.c.

Referenced by template_url_reference_allowed_runtime().

◆ template_reference_has_scheme_runtime()

int template_reference_has_scheme_runtime ( const char * text)
static

Tests whether a reference begins with a URI scheme prefix.

Parameters
textCandidate URL or path reference text.
Returns
1 when the text starts with a URI scheme, else 0.

Definition at line 4654 of file native_json_runtime_ops.c.

Referenced by template_path_reference_allowed_runtime(), and template_url_reference_allowed_runtime().

◆ template_url_reference_allowed_runtime()

int template_url_reference_allowed_runtime ( const char * text)
static

Tests whether one candidate URL reference is safe for HTML URL attributes.

Parameters
textCandidate URL, path, query, or fragment reference text.
Returns
1 when the value is allowed, else 0.

Definition at line 4712 of file native_json_runtime_ops.c.

References template_reference_contains_unsafe_char_runtime(), template_reference_has_allowed_url_scheme_runtime(), and template_reference_has_scheme_runtime().

Referenced by text_buffer_append_template_value_runtime().

◆ template_value_text_dup_runtime()

char * template_value_text_dup_runtime ( yyjson_val * value)
static

◆ tenant_id_for_business_runtime()

◆ text_buffer_append_char_runtime()

◆ text_buffer_append_format_runtime()

◆ text_buffer_append_html_escaped_runtime()

◆ text_buffer_append_template_value_runtime()

int text_buffer_append_template_value_runtime ( TextBufferRuntime * buffer,
yyjson_val * value,
TemplatePlaceholderKindRuntime kind )
static

Appends one template placeholder value using the requested safety mode.

Parameters
bufferOutput text buffer to append into.
valueJSON value resolved for the placeholder.
kindPlaceholder rendering mode.
Returns
1 on success, else 0.

Definition at line 4738 of file native_json_runtime_ops.c.

References template_path_reference_allowed_runtime(), TEMPLATE_PLACEHOLDER_HTML_RUNTIME, TEMPLATE_PLACEHOLDER_PATH_RUNTIME, TEMPLATE_PLACEHOLDER_TEXT_RUNTIME, TEMPLATE_PLACEHOLDER_URL_RUNTIME, template_url_reference_allowed_runtime(), template_value_text_dup_runtime(), text_buffer_append_html_escaped_runtime(), and text_buffer_append_text_runtime().

Referenced by render_template_text_with_default_kind_dup_runtime().

◆ text_buffer_append_text_runtime()

int text_buffer_append_text_runtime ( TextBufferRuntime * buffer,
const char * text )
static

Definition at line 106 of file native_json_runtime_ops.c.

References TextBufferRuntime::length, TextBufferRuntime::text, and text_buffer_reserve_runtime().

Referenced by append_escaped_sql_char_runtime(), append_generated_surface_relation_checkboxes_html_runtime(), append_generated_surface_select_options_html_runtime(), apply_base_path_html_dup_runtime(), appointments_render_page_params_json_dup_runtime(), build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), build_generated_surface_sort_options_html_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), capture_postgresql_result_output_runtime(), diagnostics_render_page_params_json_dup_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_calendar_page_json_runtime(), emit_explore_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_service_book_form_page_json_runtime(), error_alert_html_dup_runtime(), explore_render_page_params_json_dup_runtime(), generated_surface_display_value_dup_runtime(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_request_booking_options_json_from_form_command(), handle_template_invite_accept_page_json_command(), handle_template_layout_page_html_command(), handle_template_layout_page_json_command(), handle_template_password_reset_sent_page_json_command(), hidden_next_input_html_dup_runtime(), migration_expected_checksum_dup_runtime(), profile_render_page_params_json_dup_runtime(), render_business_dashboard_cards_html_dup_runtime(), render_page_html_dup_runtime(), render_service_booking_options_editor_html_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), service_book_form_page_params_json_dup_runtime(), sqlite_capture_callback_runtime(), text_buffer_append_html_escaped_runtime(), and text_buffer_append_template_value_runtime().

◆ text_buffer_free_runtime()

void text_buffer_free_runtime ( TextBufferRuntime * buffer)
static

Definition at line 68 of file native_json_runtime_ops.c.

References TextBufferRuntime::capacity, TextBufferRuntime::length, and TextBufferRuntime::text.

Referenced by apply_base_path_html_dup_runtime(), appointments_render_page_params_json_dup_runtime(), build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), build_generated_surface_sort_options_html_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), capture_postgresql_result_output_runtime(), day_of_week_options_html_dup_runtime(), diagnostics_render_page_params_json_dup_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_calendar_page_json_runtime(), emit_explore_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_service_book_form_page_json_runtime(), error_alert_html_dup_runtime(), explore_render_page_params_json_dup_runtime(), generated_surface_display_value_dup_runtime(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_request_booking_options_json_from_form_command(), handle_template_invite_accept_page_json_command(), handle_template_layout_page_html_command(), handle_template_layout_page_json_command(), handle_template_password_reset_sent_page_json_command(), hidden_next_input_html_dup_runtime(), html_escaped_dup_runtime(), language_options_html_dup_runtime(), migration_expected_checksum_dup_runtime(), postgresql_conninfo_dup_runtime(), profile_render_page_params_json_dup_runtime(), render_business_dashboard_cards_html_dup_runtime(), render_page_html_dup_runtime(), render_service_booking_options_editor_html_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), render_template_text_with_default_kind_dup_runtime(), run_sqlite_command_runtime(), service_book_form_page_params_json_dup_runtime(), and sql_literal_escape_dup_runtime().

◆ text_buffer_reserve_runtime()

◆ text_buffer_take_runtime()

char * text_buffer_take_runtime ( TextBufferRuntime * buffer)
static

Definition at line 153 of file native_json_runtime_ops.c.

References TextBufferRuntime::capacity, TextBufferRuntime::length, and TextBufferRuntime::text.

Referenced by apply_base_path_html_dup_runtime(), appointments_render_page_params_json_dup_runtime(), build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), build_generated_surface_sort_options_html_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), capture_postgresql_result_output_runtime(), day_of_week_options_html_dup_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_service_book_form_page_json_runtime(), error_alert_html_dup_runtime(), generated_surface_display_value_dup_runtime(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_manage_page_json_command(), handle_request_booking_options_json_from_form_command(), handle_template_invite_accept_page_json_command(), handle_template_layout_page_html_command(), handle_template_layout_page_json_command(), handle_template_password_reset_sent_page_json_command(), hidden_next_input_html_dup_runtime(), html_escaped_dup_runtime(), language_options_html_dup_runtime(), postgresql_conninfo_dup_runtime(), profile_render_page_params_json_dup_runtime(), render_business_dashboard_cards_html_dup_runtime(), render_page_html_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), render_template_text_with_default_kind_dup_runtime(), run_sqlite_command_runtime(), service_book_form_page_params_json_dup_runtime(), and sql_literal_escape_dup_runtime().

◆ time_ranges_overlap_runtime()

int time_ranges_overlap_runtime ( int start_a_minutes,
int duration_a,
int start_b_minutes,
int duration_b )
static

Definition at line 9112 of file native_json_runtime_ops.c.

Referenced by technician_booked_for_slot_runtime().

◆ trim_ascii_whitespace_range_runtime()

int trim_ascii_whitespace_range_runtime ( const char * start,
size_t len,
const char ** trimmed_start,
size_t * trimmed_len )
static

Definition at line 4377 of file native_json_runtime_ops.c.

References len.

Referenced by handle_request_lines_to_booking_options_json_command().

◆ ucal_declared_fragment_relative_path_runtime()

const char * ucal_declared_fragment_relative_path_runtime ( const char * fragment_id)
static

Resolves one UCAL declared fragment id to its app-relative template path.

Parameters
fragment_idDeclared UCAL fragment id.
Returns
Matching relative path, or NULL when the fragment id is unknown.

Definition at line 5056 of file native_json_runtime_ops.c.

References streq().

Referenced by handle_template_declared_fragment_path_command().

◆ ucal_declared_page_relative_path_runtime()

const char * ucal_declared_page_relative_path_runtime ( const char * page_id)
static

Resolves one UCAL declared page id to its app-relative page-spec path.

Parameters
page_idDeclared UCAL page id.
Returns
Matching relative path, or NULL when the page id is unknown.

Definition at line 4972 of file native_json_runtime_ops.c.

References streq().

Referenced by declared_page_relative_path_dup_runtime().

◆ ucal_runtime_state_export_postgresql_path_dup_runtime()

char * ucal_runtime_state_export_postgresql_path_dup_runtime ( const char * app_root)
static

Resolves the declarative postgresql export query path for UCAL runtime-state bridge export.

Parameters
app_rootApp root directory.
Returns
Newly allocated absolute path, or NULL when it cannot be formed.

Definition at line 2483 of file native_json_runtime_ops.c.

References path_join().

Referenced by dynamic_relational_runtime_export_json_dup_runtime().

◆ ucal_runtime_state_export_sqlite_path_dup_runtime()

char * ucal_runtime_state_export_sqlite_path_dup_runtime ( const char * app_root)
static

Resolves the declarative sqlite export query path for UCAL runtime-state bridge export.

Parameters
app_rootApp root directory.
Returns
Newly allocated absolute path, or NULL when it cannot be formed.

Definition at line 2465 of file native_json_runtime_ops.c.

References path_join().

Referenced by dynamic_relational_runtime_export_json_dup_runtime().

◆ ucal_runtime_state_import_postgresql_path_dup_runtime()

char * ucal_runtime_state_import_postgresql_path_dup_runtime ( const char * app_root)
static

Resolves the declarative postgresql import query path for UCAL runtime-state bridge import.

Parameters
app_rootApp root directory.
Returns
Newly allocated absolute path, or NULL when it cannot be formed.

Definition at line 2492 of file native_json_runtime_ops.c.

References path_join().

Referenced by dynamic_relational_runtime_import_state_runtime().

◆ ucal_runtime_state_import_sqlite_path_dup_runtime()

char * ucal_runtime_state_import_sqlite_path_dup_runtime ( const char * app_root)
static

Resolves the declarative sqlite import query path for UCAL runtime-state bridge import.

Parameters
app_rootApp root directory.
Returns
Newly allocated absolute path, or NULL when it cannot be formed.

Definition at line 2474 of file native_json_runtime_ops.c.

References path_join().

Referenced by dynamic_relational_runtime_import_state_runtime().

◆ url_decode_dup_runtime()

char * url_decode_dup_runtime ( const char * text)
static

◆ user_manages_business_runtime()

◆ value_long_equals_runtime()

int value_long_equals_runtime ( yyjson_val * value,
long expected_value )
static

Definition at line 6101 of file native_json_runtime_ops.c.

References long_from_value_runtime().

Referenced by assign_technician_for_slot_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), business_open_for_slot_runtime(), collect_business_service_list_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_business_admin_technician_rows_json_runtime(), emit_business_availability_lines_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_business_technician_ids_lines_runtime(), emit_calendar_page_json_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_service_assigned_technician_ids_lines_runtime(), emit_service_book_form_page_json_runtime(), emit_service_edit_page_json_runtime(), emit_technician_appointments_lines_runtime(), emit_technician_availability_lines_runtime(), emit_technician_edit_page_json_runtime(), emit_user_appointments_json_runtime(), emit_user_membership_tenant_ids_json_runtime(), find_array_item_by_long_field_runtime(), find_mut_array_item_by_long_field_runtime(), handle_generated_surface_mutate_command(), handle_state_named_command(), profile_render_page_params_json_dup_runtime(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), service_book_form_page_params_json_dup_runtime(), state_find_booking_for_user_runtime(), state_find_business_availability_for_business_runtime(), state_find_first_service_for_business_runtime(), state_find_google_calendar_connection_for_business_runtime(), state_find_service_for_business_runtime(), state_find_technician_for_business_runtime(), state_tenant_id_for_business_id_runtime(), state_tenant_id_for_business_slug_runtime(), and technician_booked_for_slot_runtime().

◆ weekday_monday_index_runtime()

int weekday_monday_index_runtime ( int year,
int month,
int day )
static

◆ weekday_rank_runtime()

int weekday_rank_runtime ( const char * value)
static

Definition at line 14904 of file native_json_runtime_ops.c.

References streq().

Referenced by surface_compare_sort_values_runtime().

◆ write_binary_file_runtime()

int write_binary_file_runtime ( const char * path,
const unsigned char * data,
size_t length )

Writes one binary byte range to a file path, creating parent directories as needed.

Writes a binary byte range to a file, creating parent directories as needed.

Parameters
pathDestination path.
dataBytes to write.
lengthNumber of bytes to write.
Returns
0 on success, or a non-zero status code on failure.

Writes one binary byte range to a file path, creating parent directories as needed.

Parameters
pathDestination file path.
dataBytes to write.
lengthNumber of bytes to write.
Returns
0 on success, non-zero on failure.

Definition at line 462 of file native_json_runtime_ops.c.

References ensure_directory(), and path_dirname().

Referenced by store_uploaded_media().

◆ write_mutable_json_doc_runtime()

int write_mutable_json_doc_runtime ( yyjson_mut_doc * doc,
const char * path )
static

◆ write_temp_text_file_runtime()

int write_temp_text_file_runtime ( const char * text,
char ** path_out )
static

Definition at line 2167 of file native_json_runtime_ops.c.

Referenced by checksum_string_runtime(), and cksum_signature_runtime().