|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
#include "native_dynamic_relational.h"#include "native_dynamic_config.h"#include "native_fs.h"#include "native_support.h"#include "native_yyjson_helpers.h"#include <sqlite3.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <dlfcn.h>Go to the source code of this file.
Data Structures | |
| struct | NativeDynamicPostgresqlRuntimeConfig |
| Carries resolved PostgreSQL runtime connection settings. More... | |
| struct | NativeDynamicLibpqApi |
Macros | |
| #define | PHAROS_SQLITE_BUSY_TIMEOUT_MS_RUNTIME 15000 |
| #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 struct pg_conn | PGconn |
| typedef struct pg_result | PGresult |
Functions | |
| static yyjson_val * | migration_backend_record_runtime_local (yyjson_val *root, const char *backend_value) |
| static char * | migration_fixture_path_dup_runtime_local (const char *app_root) |
| static char * | runtime_state_export_sqlite_path_dup_runtime_local (const char *app_root) |
| static char * | runtime_state_import_sqlite_path_dup_runtime_local (const char *app_root) |
| static char * | runtime_state_export_postgresql_path_dup_runtime_local (const char *app_root) |
| static char * | runtime_state_import_postgresql_path_dup_runtime_local (const char *app_root) |
| static int | sqlite_configure_connection_runtime_local (sqlite3 *db) |
| static char * | sqlite_exec_first_value_dup_runtime_local (const char *sqlite_path, const char *sql_text) |
| static int | sqlite_exec_runtime_local (const char *sqlite_path, const char *sql_text) |
| static int | sqlite_apply_file_list_runtime_local (const char *sqlite_path, const char *app_root, yyjson_val *list) |
| static char * | checksum_string_dup_runtime_local (const char *value) |
| static char * | migration_expected_checksum_dup_runtime_local (const char *app_root, yyjson_val *migration_record, const char *backend) |
| static void | free_postgresql_runtime_config_runtime_local (NativeDynamicPostgresqlRuntimeConfig *config) |
| static int | load_postgresql_runtime_config_runtime_local (const char *app_root, const char *runtime_conf_path, NativeDynamicPostgresqlRuntimeConfig *config) |
| static int | conninfo_append_kv_runtime_local (Buffer *buffer, const char *key, const char *value, int escape_quotes) |
| static void * | open_libpq_handle_candidate_runtime_local (const char *path) |
| static int | load_native_libpq_api_runtime_local (NativeDynamicLibpqApi *api) |
| static void | free_native_libpq_api_runtime_local (NativeDynamicLibpqApi *api) |
| static char * | postgresql_conninfo_dup_runtime_local (const NativeDynamicPostgresqlRuntimeConfig *config) |
| static int | capture_postgresql_result_output_runtime_local (const NativeDynamicLibpqApi *api, PGresult *result, char **output_out) |
| static int | run_postgresql_sql_capture_runtime_local (const NativeDynamicPostgresqlRuntimeConfig *config, const char *sql_text, int capture_output, char **output_out) |
| static int | postgresql_apply_file_list_runtime_local (const NativeDynamicPostgresqlRuntimeConfig *config, const char *app_root, yyjson_val *list) |
| static char * | runtime_state_placeholder_sql_dup_runtime_local (const char *sql_template, const char *escaped_state_json) |
| static char * | sql_literal_escape_dup_runtime_local (const char *value) |
| void | native_dynamic_relational_request_sync_free (NativeDynamicRelationalRequestSync *sync) |
| Clears heap-owned fields in a request-local relational sync record. | |
| char * | native_dynamic_relational_backend_dup (const char *app_root, const char *runtime_conf_path) |
| Returns the configured relational backend when it is recognized. | |
| char * | native_dynamic_relational_sqlite_path_dup (const char *app_root, const char *runtime_conf_path, const char *app_id) |
| Returns the effective sqlite database path for a dynamic app. | |
| int | native_dynamic_relational_sqlite_runtime_ready (const char *app_root, const char *runtime_conf_path, const char *app_id) |
| Returns whether sqlite runtime prerequisites are satisfied. | |
| int | native_dynamic_relational_postgresql_runtime_ready (const char *app_root, const char *runtime_conf_path) |
| Returns whether PostgreSQL runtime prerequisites are satisfied. | |
| int | native_dynamic_relational_postgresql_runtime_prepare (const char *app_root, const char *runtime_conf_path) |
| Prepares the PostgreSQL schema, seed data, and migration ledger for one dynamic app. | |
| int | native_dynamic_relational_sqlite_runtime_prepare (const char *app_root, const char *runtime_conf_path, const char *app_id) |
| Prepares the sqlite schema, seed data, and migration ledger for one dynamic app. | |
| char * | native_dynamic_relational_runtime_export_json_dup (const char *app_root, const char *runtime_conf_path, const char *app_id) |
| Exports canonical runtime state JSON from the configured relational backend. | |
| char * | native_dynamic_relational_runtime_audit_count_dup (const char *app_root, const char *runtime_conf_path, const char *app_id) |
| Returns the current audit-event count from the configured relational backend. | |
| int | native_dynamic_relational_runtime_import_state (const char *app_root, const char *runtime_conf_path, const char *app_id, const char *state_path, const char *expected_audit_count) |
| Imports canonical runtime state JSON into the configured relational backend. | |
| char * | native_dynamic_relational_file_signature_dup (const char *path) |
| Computes a stable signature for one file path. | |
| int | native_dynamic_relational_prepare_request_state (const AppRuntime *app, NativeDynamicRelationalRequestSync *sync) |
| Exports relational state into the app state file before request handling when enabled. | |
| int | native_dynamic_relational_sync_back_if_changed (const AppRuntime *app, const NativeDynamicRelationalRequestSync *sync) |
| Imports the app state file back into the relational backend when it changed. | |
| #define PHAROS_CONN_STATUS_OK_RUNTIME 0 |
Definition at line 52 of file native_dynamic_relational.c.
Referenced by run_postgresql_sql_capture_runtime(), and run_postgresql_sql_capture_runtime_local().
| #define PHAROS_PGRES_COMMAND_OK_RUNTIME 1 |
Definition at line 53 of file native_dynamic_relational.c.
Referenced by run_postgresql_sql_capture_runtime(), and run_postgresql_sql_capture_runtime_local().
| #define PHAROS_PGRES_SINGLE_TUPLE_RUNTIME 9 |
Definition at line 55 of file native_dynamic_relational.c.
Referenced by run_postgresql_sql_capture_runtime(), and run_postgresql_sql_capture_runtime_local().
| #define PHAROS_PGRES_TUPLES_OK_RUNTIME 2 |
Definition at line 54 of file native_dynamic_relational.c.
Referenced by run_postgresql_sql_capture_runtime(), and run_postgresql_sql_capture_runtime_local().
| #define PHAROS_SQLITE_BUSY_TIMEOUT_MS_RUNTIME 15000 |
Definition at line 13 of file native_dynamic_relational.c.
Referenced by sqlite_configure_connection_runtime_local().
| typedef struct pg_conn PGconn |
Definition at line 33 of file native_dynamic_relational.c.
| typedef struct pg_result PGresult |
Definition at line 34 of file native_dynamic_relational.c.
|
static |
Definition at line 484 of file native_dynamic_relational.c.
References buffer_append(), buffer_free(), buffer_init(), Buffer::data, NativeDynamicLibpqApi::PQgetvalue, NativeDynamicLibpqApi::PQnfields, NativeDynamicLibpqApi::PQntuples, and trim_in_place().
Referenced by run_postgresql_sql_capture_runtime_local().
|
static |
Definition at line 193 of file native_dynamic_relational.c.
Referenced by migration_expected_checksum_dup_runtime_local().
|
static |
Definition at line 346 of file native_dynamic_relational.c.
References buffer_append(), and Buffer::len.
Referenced by postgresql_conninfo_dup_runtime_local().
|
static |
Definition at line 435 of file native_dynamic_relational.c.
References NativeDynamicLibpqApi::handle.
Referenced by native_dynamic_relational_postgresql_runtime_ready(), and run_postgresql_sql_capture_runtime_local().
|
static |
Definition at line 286 of file native_dynamic_relational.c.
References NativeDynamicPostgresqlRuntimeConfig::database, NativeDynamicPostgresqlRuntimeConfig::host, NativeDynamicPostgresqlRuntimeConfig::password_env_name, NativeDynamicPostgresqlRuntimeConfig::port, NativeDynamicPostgresqlRuntimeConfig::tls_cert, NativeDynamicPostgresqlRuntimeConfig::tls_key, NativeDynamicPostgresqlRuntimeConfig::tls_mode, NativeDynamicPostgresqlRuntimeConfig::tls_root_cert, and NativeDynamicPostgresqlRuntimeConfig::user.
Referenced by load_postgresql_runtime_config_runtime_local(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_postgresql_runtime_ready(), native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_runtime_export_json_dup(), and native_dynamic_relational_runtime_import_state().
|
static |
Definition at line 381 of file native_dynamic_relational.c.
References NativeDynamicLibpqApi::handle, open_libpq_handle_candidate_runtime_local(), path_exists(), path_join(), NativeDynamicLibpqApi::PQclear, NativeDynamicLibpqApi::PQconnectdb, NativeDynamicLibpqApi::PQerrorMessage, NativeDynamicLibpqApi::PQexec, NativeDynamicLibpqApi::PQfinish, NativeDynamicLibpqApi::PQgetvalue, NativeDynamicLibpqApi::PQnfields, NativeDynamicLibpqApi::PQntuples, NativeDynamicLibpqApi::PQresultStatus, and NativeDynamicLibpqApi::PQstatus.
Referenced by native_dynamic_relational_postgresql_runtime_ready(), and run_postgresql_sql_capture_runtime_local().
|
static |
Definition at line 302 of file native_dynamic_relational.c.
References NativeDynamicPostgresqlRuntimeConfig::database, free_postgresql_runtime_config_runtime_local(), NativeDynamicPostgresqlRuntimeConfig::host, native_dynamic_config_merged_value_dup(), NativeDynamicPostgresqlRuntimeConfig::password_env_name, path_exists(), NativeDynamicPostgresqlRuntimeConfig::port, streq(), NativeDynamicPostgresqlRuntimeConfig::tls_cert, NativeDynamicPostgresqlRuntimeConfig::tls_key, NativeDynamicPostgresqlRuntimeConfig::tls_mode, NativeDynamicPostgresqlRuntimeConfig::tls_root_cert, and NativeDynamicPostgresqlRuntimeConfig::user.
Referenced by native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_postgresql_runtime_ready(), native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_runtime_export_json_dup(), and native_dynamic_relational_runtime_import_state().
|
static |
Definition at line 57 of file native_dynamic_relational.c.
References native_json_obj_get(), native_json_obj_get_array(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_equals_str(), and yyjson_is_str().
Referenced by native_dynamic_relational_postgresql_runtime_prepare(), and native_dynamic_relational_sqlite_runtime_prepare().
|
static |
Definition at line 208 of file native_dynamic_relational.c.
References buffer_append(), buffer_free(), buffer_init(), checksum_string_dup_runtime_local(), Buffer::data, native_json_obj_get(), native_json_obj_get_array(), native_json_obj_get_string_dup(), path_exists(), read_file_text(), resolve_relative_to(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_get_str(), yyjson_is_obj(), and yyjson_is_str().
Referenced by native_dynamic_relational_postgresql_runtime_prepare(), and native_dynamic_relational_sqlite_runtime_prepare().
|
static |
Definition at line 73 of file native_dynamic_relational.c.
References path_join().
Referenced by native_dynamic_relational_postgresql_runtime_prepare(), and native_dynamic_relational_sqlite_runtime_prepare().
| char * native_dynamic_relational_backend_dup | ( | const char * | app_root, |
| const char * | runtime_conf_path ) |
Returns the configured relational backend when it is recognized.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
Definition at line 679 of file native_dynamic_relational.c.
References native_dynamic_config_merged_value_dup(), and streq().
Referenced by handle_dynamic_relational_backend_command(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_postgresql_runtime_ready(), native_dynamic_relational_prepare_request_state(), native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_runtime_export_json_dup(), native_dynamic_relational_runtime_import_state(), native_dynamic_relational_sqlite_runtime_prepare(), native_dynamic_relational_sqlite_runtime_ready(), and persist_app_state_text_runtime_local().
| char * native_dynamic_relational_file_signature_dup | ( | const char * | path | ) |
Computes a stable signature for one file path.
| path | File path to hash. |
Definition at line 1220 of file native_dynamic_relational.c.
References path_exists(), and read_file_bytes_dup_runtime().
Referenced by native_dynamic_relational_prepare_request_state(), and native_dynamic_relational_sync_back_if_changed().
| int native_dynamic_relational_postgresql_runtime_prepare | ( | const char * | app_root, |
| const char * | runtime_conf_path ) |
Prepares the PostgreSQL schema, seed data, and migration ledger for one dynamic app.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
Definition at line 752 of file native_dynamic_relational.c.
References free_postgresql_runtime_config_runtime_local(), load_postgresql_runtime_config_runtime_local(), migration_backend_record_runtime_local(), migration_expected_checksum_dup_runtime_local(), migration_fixture_path_dup_runtime_local(), native_dynamic_relational_backend_dup(), 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(), postgresql_apply_file_list_runtime_local(), run_postgresql_sql_capture_runtime_local(), sql_literal_escape_dup_runtime_local(), streq(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_arr_size(), and yyjson_doc_get_root().
Referenced by handle_dynamic_postgresql_runtime_prepare_command(), and native_dynamic_relational_prepare_request_state().
| int native_dynamic_relational_postgresql_runtime_ready | ( | const char * | app_root, |
| const char * | runtime_conf_path ) |
Returns whether PostgreSQL runtime prerequisites are satisfied.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
Definition at line 733 of file native_dynamic_relational.c.
References free_native_libpq_api_runtime_local(), free_postgresql_runtime_config_runtime_local(), load_native_libpq_api_runtime_local(), load_postgresql_runtime_config_runtime_local(), native_dynamic_relational_backend_dup(), and streq().
Referenced by handle_dynamic_postgresql_runtime_ready_command(), and native_dynamic_relational_prepare_request_state().
| int native_dynamic_relational_prepare_request_state | ( | const AppRuntime * | app, |
| NativeDynamicRelationalRequestSync * | sync ) |
Exports relational state into the app state file before request handling when enabled.
| app | App runtime being served. |
| sync | Output sync record to populate. |
Definition at line 1248 of file native_dynamic_relational.c.
References AppRuntime::app_id, AppRuntime::app_root, NativeDynamicRelationalRequestSync::before_signature, NativeDynamicRelationalRequestSync::enabled, ensure_directory(), native_dynamic_relational_backend_dup(), native_dynamic_relational_file_signature_dup(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_postgresql_runtime_ready(), native_dynamic_relational_request_sync_free(), native_dynamic_relational_runtime_export_json_dup(), native_dynamic_relational_sqlite_runtime_prepare(), native_dynamic_relational_sqlite_runtime_ready(), path_dirname(), AppRuntime::runtime_conf_path, AppRuntime::state_path, streq(), and write_text_file().
Referenced by native_dynamic_runtime_handle_request().
| void native_dynamic_relational_request_sync_free | ( | NativeDynamicRelationalRequestSync * | sync | ) |
Clears heap-owned fields in a request-local relational sync record.
| sync | Sync record to clear. |
Definition at line 670 of file native_dynamic_relational.c.
References NativeDynamicRelationalRequestSync::before_signature, and NativeDynamicRelationalRequestSync::enabled.
Referenced by native_dynamic_relational_prepare_request_state(), and native_dynamic_runtime_handle_request().
| char * native_dynamic_relational_runtime_audit_count_dup | ( | const char * | app_root, |
| const char * | runtime_conf_path, | ||
| const char * | app_id ) |
Returns the current audit-event count from the configured relational backend.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
| app_id | App identifier used for sqlite path resolution. |
Definition at line 1107 of file native_dynamic_relational.c.
References free_postgresql_runtime_config_runtime_local(), load_postgresql_runtime_config_runtime_local(), native_dynamic_relational_backend_dup(), native_dynamic_relational_sqlite_path_dup(), run_postgresql_sql_capture_runtime_local(), sqlite_exec_first_value_dup_runtime_local(), and streq().
Referenced by handle_dynamic_relational_runtime_audit_count_command(), and native_dynamic_relational_runtime_import_state().
| char * native_dynamic_relational_runtime_export_json_dup | ( | const char * | app_root, |
| const char * | runtime_conf_path, | ||
| const char * | app_id ) |
Exports canonical runtime state JSON from the configured relational backend.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
| app_id | App identifier used for sqlite path resolution. |
Definition at line 1065 of file native_dynamic_relational.c.
References free_postgresql_runtime_config_runtime_local(), load_postgresql_runtime_config_runtime_local(), native_dynamic_relational_backend_dup(), native_dynamic_relational_sqlite_path_dup(), read_file_text(), run_postgresql_sql_capture_runtime_local(), runtime_state_export_postgresql_path_dup_runtime_local(), runtime_state_export_sqlite_path_dup_runtime_local(), sqlite_exec_first_value_dup_runtime_local(), and streq().
Referenced by handle_dynamic_relational_runtime_export_json_command(), native_dynamic_relational_prepare_request_state(), and persist_app_state_text_runtime_local().
| int native_dynamic_relational_runtime_import_state | ( | const char * | app_root, |
| const char * | runtime_conf_path, | ||
| const char * | app_id, | ||
| const char * | state_path, | ||
| const char * | expected_audit_count ) |
Imports canonical runtime state JSON into the configured relational backend.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
| app_id | App identifier used for sqlite path resolution. |
| state_path | Canonical state JSON path. |
| expected_audit_count | Optional optimistic concurrency guard. |
Definition at line 1153 of file native_dynamic_relational.c.
References free_postgresql_runtime_config_runtime_local(), load_postgresql_runtime_config_runtime_local(), native_dynamic_relational_backend_dup(), native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_sqlite_path_dup(), read_file_text(), run_postgresql_sql_capture_runtime_local(), runtime_state_import_postgresql_path_dup_runtime_local(), runtime_state_import_sqlite_path_dup_runtime_local(), runtime_state_placeholder_sql_dup_runtime_local(), sql_literal_escape_dup_runtime_local(), sqlite_exec_runtime_local(), and streq().
Referenced by handle_dynamic_relational_runtime_import_state_command(), native_dynamic_relational_sync_back_if_changed(), and persist_app_state_text_runtime_local().
| char * native_dynamic_relational_sqlite_path_dup | ( | const char * | app_root, |
| const char * | runtime_conf_path, | ||
| const char * | app_id ) |
Returns the effective sqlite database path for a dynamic app.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
| app_id | App identifier used for the default sqlite path. |
Definition at line 688 of file native_dynamic_relational.c.
References native_dynamic_config_merged_value_dup().
Referenced by handle_dynamic_relational_sqlite_path_command(), native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_runtime_export_json_dup(), native_dynamic_relational_runtime_import_state(), native_dynamic_relational_sqlite_runtime_prepare(), and native_dynamic_relational_sqlite_runtime_ready().
| int native_dynamic_relational_sqlite_runtime_prepare | ( | const char * | app_root, |
| const char * | runtime_conf_path, | ||
| const char * | app_id ) |
Prepares the sqlite schema, seed data, and migration ledger for one dynamic app.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
| app_id | App identifier used for the default sqlite path. |
Definition at line 914 of file native_dynamic_relational.c.
References ensure_directory(), migration_backend_record_runtime_local(), migration_expected_checksum_dup_runtime_local(), migration_fixture_path_dup_runtime_local(), native_dynamic_relational_backend_dup(), native_dynamic_relational_sqlite_path_dup(), 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(), path_dirname(), sql_literal_escape_dup_runtime_local(), sqlite_apply_file_list_runtime_local(), sqlite_exec_first_value_dup_runtime_local(), sqlite_exec_runtime_local(), streq(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_arr_size(), and yyjson_doc_get_root().
Referenced by handle_dynamic_sqlite_runtime_prepare_command(), and native_dynamic_relational_prepare_request_state().
| int native_dynamic_relational_sqlite_runtime_ready | ( | const char * | app_root, |
| const char * | runtime_conf_path, | ||
| const char * | app_id ) |
Returns whether sqlite runtime prerequisites are satisfied.
| app_root | App root directory. |
| runtime_conf_path | Runtime config path. |
| app_id | App identifier used for the default sqlite path. |
Definition at line 709 of file native_dynamic_relational.c.
References ensure_directory(), native_dynamic_relational_backend_dup(), native_dynamic_relational_sqlite_path_dup(), path_dirname(), path_exists(), and streq().
Referenced by handle_dynamic_sqlite_runtime_ready_command(), and native_dynamic_relational_prepare_request_state().
| int native_dynamic_relational_sync_back_if_changed | ( | const AppRuntime * | app, |
| const NativeDynamicRelationalRequestSync * | sync ) |
Imports the app state file back into the relational backend when it changed.
| app | App runtime being served. |
| sync | Request sync record populated by prepare_request_state. |
Definition at line 1316 of file native_dynamic_relational.c.
References AppRuntime::app_id, AppRuntime::app_root, NativeDynamicRelationalRequestSync::before_signature, NativeDynamicRelationalRequestSync::enabled, native_dynamic_relational_file_signature_dup(), native_dynamic_relational_runtime_import_state(), AppRuntime::runtime_conf_path, AppRuntime::state_path, and streq().
Referenced by native_dynamic_runtime_handle_request().
|
static |
Definition at line 373 of file native_dynamic_relational.c.
Referenced by load_native_libpq_api_runtime_local().
|
static |
Definition at line 586 of file native_dynamic_relational.c.
References read_file_text(), resolve_relative_to(), run_postgresql_sql_capture_runtime_local(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_get_str(), and yyjson_is_str().
Referenced by native_dynamic_relational_postgresql_runtime_prepare().
|
static |
Definition at line 446 of file native_dynamic_relational.c.
References buffer_free(), buffer_init(), conninfo_append_kv_runtime_local(), Buffer::data, NativeDynamicPostgresqlRuntimeConfig::database, NativeDynamicPostgresqlRuntimeConfig::host, NativeDynamicPostgresqlRuntimeConfig::password_env_name, NativeDynamicPostgresqlRuntimeConfig::port, NativeDynamicPostgresqlRuntimeConfig::tls_cert, NativeDynamicPostgresqlRuntimeConfig::tls_key, NativeDynamicPostgresqlRuntimeConfig::tls_mode, NativeDynamicPostgresqlRuntimeConfig::tls_root_cert, and NativeDynamicPostgresqlRuntimeConfig::user.
Referenced by run_postgresql_sql_capture_runtime_local().
|
static |
Definition at line 530 of file native_dynamic_relational.c.
References capture_postgresql_result_output_runtime_local(), free_native_libpq_api_runtime_local(), load_native_libpq_api_runtime_local(), PHAROS_CONN_STATUS_OK_RUNTIME, PHAROS_PGRES_COMMAND_OK_RUNTIME, PHAROS_PGRES_SINGLE_TUPLE_RUNTIME, PHAROS_PGRES_TUPLES_OK_RUNTIME, postgresql_conninfo_dup_runtime_local(), NativeDynamicLibpqApi::PQclear, NativeDynamicLibpqApi::PQconnectdb, NativeDynamicLibpqApi::PQerrorMessage, NativeDynamicLibpqApi::PQexec, NativeDynamicLibpqApi::PQfinish, NativeDynamicLibpqApi::PQresultStatus, and NativeDynamicLibpqApi::PQstatus.
Referenced by native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_runtime_export_json_dup(), native_dynamic_relational_runtime_import_state(), and postgresql_apply_file_list_runtime_local().
|
static |
Definition at line 85 of file native_dynamic_relational.c.
References path_join().
Referenced by native_dynamic_relational_runtime_export_json_dup().
|
static |
Definition at line 77 of file native_dynamic_relational.c.
References path_join().
Referenced by native_dynamic_relational_runtime_export_json_dup().
|
static |
Definition at line 89 of file native_dynamic_relational.c.
References path_join().
Referenced by native_dynamic_relational_runtime_import_state().
|
static |
Definition at line 81 of file native_dynamic_relational.c.
References path_join().
Referenced by native_dynamic_relational_runtime_import_state().
|
static |
Definition at line 619 of file native_dynamic_relational.c.
Referenced by native_dynamic_relational_runtime_import_state().
|
static |
Definition at line 643 of file native_dynamic_relational.c.
Referenced by native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_runtime_import_state(), and native_dynamic_relational_sqlite_runtime_prepare().
|
static |
Definition at line 164 of file native_dynamic_relational.c.
References read_file_text(), resolve_relative_to(), sqlite_exec_runtime_local(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_get_str(), and yyjson_is_str().
Referenced by native_dynamic_relational_sqlite_runtime_prepare().
|
static |
Definition at line 93 of file native_dynamic_relational.c.
References PHAROS_SQLITE_BUSY_TIMEOUT_MS_RUNTIME.
Referenced by sqlite_exec_first_value_dup_runtime_local(), and sqlite_exec_runtime_local().
|
static |
Definition at line 107 of file native_dynamic_relational.c.
References sqlite_configure_connection_runtime_local().
Referenced by native_dynamic_relational_runtime_audit_count_dup(), native_dynamic_relational_runtime_export_json_dup(), and native_dynamic_relational_sqlite_runtime_prepare().
|
static |
Definition at line 139 of file native_dynamic_relational.c.
References sqlite_configure_connection_runtime_local().
Referenced by native_dynamic_relational_runtime_import_state(), native_dynamic_relational_sqlite_runtime_prepare(), and sqlite_apply_file_list_runtime_local().