|
Arachne 1.0
Arachne - the perpetual stitcher of Wikidata entities.
|
Classes | |
| class | statement |
| class | database |
| class | transaction |
| struct | staging_guard |
| struct | export_table |
Typedefs | |
| using | json = nlohmann::json |
Enumerations | |
| enum class | database_access { ordinary , immutable_readonly , ordinary , immutable_readonly } |
| enum class | database_access { ordinary , immutable_readonly , ordinary , immutable_readonly } |
Functions | |
| void | fail (std::string message) |
| std::string | sqlite_message (sqlite3 *db, std::string_view operation) |
| std::string | sqlite_immutable_uri (const fs::path &path) |
| std::string | read_bytes (const fs::path &path) |
| json | read_json (const fs::path &path) |
| void | write_bytes (const fs::path &path, std::string_view bytes) |
| std::string | lowercase (std::string value) |
| bool | is_sha256 (std::string_view value) |
| void | require_sha256 (std::string_view value, std::string_view field) |
| std::string | canonical_json (const json &value) |
| std::string | require_string (const json &object, std::string_view key, std::string_view context) |
| std::optional< int > | optional_integer (const json &object, std::string_view key, std::string_view context) |
| std::optional< double > | optional_number (const json &object, std::string_view key, std::string_view context) |
| const json & | array_or_empty (const json &object, std::string_view key, std::string_view context) |
| void | configure_connection (const database &db) |
| fs::path | schema_path (std::string_view filename) |
| void | create_candidate_schema (const database &db) |
| std::string | domain_name (graph_domain) |
| fs::path | domain_path (const fs::path &root, graph_domain domain) |
| std::string | read_active_id (const fs::path &root, graph_domain domain) |
| void | write_active_id (const fs::path &root, graph_domain domain, std::string_view id) |
| fs::path | make_staging_directory (const fs::path &root, graph_domain domain, std::string_view seed) |
| void | remove_staging_sqlite_sidecars (const fs::path &database_path, const fs::path &expected_staging_directory) |
| void | validate_stable_contract_id (std::string_view value, std::string_view context) |
| int | require_integer (const json &object, std::string_view key, std::string_view context) |
| double | require_number (const json &object, std::string_view key, std::string_view context) |
| void | require_only_fields (const json &object, std::initializer_list< std::string_view > fields, std::string_view context) |
| void | import_candidate_plan (sqlite3 *db, const json &control, const json &payload) |
| bool | query_has_row (sqlite3 *db, std::string_view sql) |
| void | add_problem_if (integrity_report &report, sqlite3 *db, std::string_view sql, std::string message) |
| integrity_report | inspect_database (graph_domain domain, const fs::path &database_path, const database_access access=database_access::ordinary) |
| void | seal_and_validate_database (const graph_domain domain, const fs::path &database_path) |
| const std::vector< export_table > & | export_tables (graph_domain domain) |
| json | sqlite_value (sqlite3_stmt *statement_value, int column) |
| snapshot_result | snapshot_from_directory (const fs::path &root, graph_domain domain, std::string id, bool verify_hashes) |
| snapshot_result | finalize_snapshot (const fs::path &root, graph_domain domain, staging_guard &staging, std::string snapshot_id, std::string database_hash, std::string export_hash, std::size_t applied, std::size_t skipped) |
| void | require_valid_contract (arachnespace::contracts::contract_name expected, const json &document, std::string_view context) |
| json | read_candidate_payload (const fs::path &path) |
| std::string | utc_now () |
| json | artifact (std::string storage_ref, std::string sha256, std::uintmax_t byte_length, std::string media_type) |
| json | write_validation_report (const fs::path &staging_path, graph_domain domain, std::string_view snapshot_id) |
Variables | |
| constexpr std::string_view | candidate_contract = "research_candidate_graph_snapshot_v1" |
| using arachne::penelope::anonymous_namespace{store.cpp}::json = nlohmann::json |
|
strong |
| Enumerator | |
|---|---|
| ordinary | |
| immutable_readonly | |
| ordinary | |
| immutable_readonly | |
Definition at line 126 of file store.cpp.
|
strong |
| void arachne::penelope::anonymous_namespace{store.cpp}::add_problem_if | ( | integrity_report & | report, |
| sqlite3 * | db, | ||
| std::string_view | sql, | ||
| std::string | message ) |
Definition at line 1029 of file store.cpp.
| const json & arachne::penelope::anonymous_namespace{store.cpp}::array_or_empty | ( | const json & | object, |
| std::string_view | key, | ||
| std::string_view | context ) |
Definition at line 364 of file store.cpp.
| json arachne::penelope::anonymous_namespace{store.cpp}::artifact | ( | std::string | storage_ref, |
| std::string | sha256, | ||
| std::uintmax_t | byte_length, | ||
| std::string | media_type ) |
| std::string arachne::penelope::anonymous_namespace{store.cpp}::canonical_json | ( | const json & | value | ) |
| void arachne::penelope::anonymous_namespace{store.cpp}::configure_connection | ( | const database & | db | ) |
Definition at line 381 of file store.cpp.
Referenced by arachne::penelope::store::replace_candidate_snapshot(), and seal_and_validate_database().

| void arachne::penelope::anonymous_namespace{store.cpp}::create_candidate_schema | ( | const database & | db | ) |
Definition at line 405 of file store.cpp.
Referenced by arachne::penelope::store::replace_candidate_snapshot().

| std::string arachne::penelope::anonymous_namespace{store.cpp}::domain_name | ( | graph_domain | ) |
Definition at line 409 of file store.cpp.
Referenced by domain_path(), and write_validation_report().

| fs::path arachne::penelope::anonymous_namespace{store.cpp}::domain_path | ( | const fs::path & | root, |
| graph_domain | domain ) |
Definition at line 411 of file store.cpp.
References domain_name().
Referenced by finalize_snapshot(), make_staging_directory(), read_active_id(), snapshot_from_directory(), and write_active_id().


| const std::vector< export_table > & arachne::penelope::anonymous_namespace{store.cpp}::export_tables | ( | graph_domain | domain | ) |
| void arachne::penelope::anonymous_namespace{store.cpp}::fail | ( | std::string | message | ) |
Definition at line 42 of file store.cpp.
Referenced by arachne::penelope::anonymous_namespace{store.cpp}::database::database().

| snapshot_result arachne::penelope::anonymous_namespace{store.cpp}::finalize_snapshot | ( | const fs::path & | root, |
| graph_domain | domain, | ||
| staging_guard & | staging, | ||
| std::string | snapshot_id, | ||
| std::string | database_hash, | ||
| std::string | export_hash, | ||
| std::size_t | applied, | ||
| std::size_t | skipped ) |
Definition at line 1240 of file store.cpp.
References arachne::penelope::snapshot_result::activated, arachne::penelope::snapshot_result::applied_inputs, arachne::penelope::snapshot_result::changed, arachne::penelope::snapshot_result::database_sha256, domain_path(), arachne::penelope::snapshot_result::export_sha256, arachne::penelope::anonymous_namespace{store.cpp}::staging_guard::keep, read_active_id(), arachne::penelope::snapshot_result::skipped_inputs, snapshot_from_directory(), and write_active_id().

| void arachne::penelope::anonymous_namespace{store.cpp}::import_candidate_plan | ( | sqlite3 * | db, |
| const json & | control, | ||
| const json & | payload ) |
Definition at line 594 of file store.cpp.
References arachne::penelope::anonymous_namespace{store.cpp}::statement::done(), and validate_stable_contract_id().

| integrity_report arachne::penelope::anonymous_namespace{store.cpp}::inspect_database | ( | graph_domain | domain, |
| const fs::path & | database_path, | ||
| const database_access | access = database_access::ordinary ) |
Definition at line 1038 of file store.cpp.
References arachne::penelope::anonymous_namespace{store.cpp}::database::database(), arachne::penelope::anonymous_namespace{store.cpp}::database::get(), arachne::penelope::anonymous_namespace{store.cpp}::statement::get(), arachne::penelope::integrity_report::ok, and arachne::penelope::anonymous_namespace{store.cpp}::statement::row().
Referenced by arachne::penelope::store::integrity_check(), and seal_and_validate_database().


| bool arachne::penelope::anonymous_namespace{store.cpp}::is_sha256 | ( | std::string_view | value | ) |
| std::string arachne::penelope::anonymous_namespace{store.cpp}::lowercase | ( | std::string | value | ) |
| fs::path arachne::penelope::anonymous_namespace{store.cpp}::make_staging_directory | ( | const fs::path & | root, |
| graph_domain | domain, | ||
| std::string_view | seed ) |
Definition at line 451 of file store.cpp.
References domain_path(), and arachne::crypto::sha256().

| std::optional< int > arachne::penelope::anonymous_namespace{store.cpp}::optional_integer | ( | const json & | object, |
| std::string_view | key, | ||
| std::string_view | context ) |
Definition at line 325 of file store.cpp.
| std::optional< double > arachne::penelope::anonymous_namespace{store.cpp}::optional_number | ( | const json & | object, |
| std::string_view | key, | ||
| std::string_view | context ) |
Definition at line 341 of file store.cpp.
| bool arachne::penelope::anonymous_namespace{store.cpp}::query_has_row | ( | sqlite3 * | db, |
| std::string_view | sql ) |
Definition at line 1024 of file store.cpp.
References arachne::penelope::anonymous_namespace{store.cpp}::statement::row().

| std::string arachne::penelope::anonymous_namespace{store.cpp}::read_active_id | ( | const fs::path & | root, |
| graph_domain | domain ) |
Definition at line 415 of file store.cpp.
References domain_path(), and read_bytes().
Referenced by finalize_snapshot().


| std::string arachne::penelope::anonymous_namespace{store.cpp}::read_bytes | ( | const fs::path & | path | ) |
Definition at line 246 of file store.cpp.
Referenced by read_active_id(), and read_candidate_payload().

| json arachne::penelope::anonymous_namespace{store.cpp}::read_candidate_payload | ( | const fs::path & | path | ) |
Definition at line 1400 of file store.cpp.
References read_bytes().

| json arachne::penelope::anonymous_namespace{store.cpp}::read_json | ( | const fs::path & | path | ) |
| void arachne::penelope::anonymous_namespace{store.cpp}::remove_staging_sqlite_sidecars | ( | const fs::path & | database_path, |
| const fs::path & | expected_staging_directory ) |
Definition at line 473 of file store.cpp.
Referenced by arachne::penelope::store::checkpoint_staging().

| int arachne::penelope::anonymous_namespace{store.cpp}::require_integer | ( | const json & | object, |
| std::string_view | key, | ||
| std::string_view | context ) |
Definition at line 536 of file store.cpp.
| double arachne::penelope::anonymous_namespace{store.cpp}::require_number | ( | const json & | object, |
| std::string_view | key, | ||
| std::string_view | context ) |
Definition at line 556 of file store.cpp.
| void arachne::penelope::anonymous_namespace{store.cpp}::require_only_fields | ( | const json & | object, |
| std::initializer_list< std::string_view > | fields, | ||
| std::string_view | context ) |
Definition at line 576 of file store.cpp.
| void arachne::penelope::anonymous_namespace{store.cpp}::require_sha256 | ( | std::string_view | value, |
| std::string_view | field ) |
Definition at line 294 of file store.cpp.
Referenced by arachne::penelope::store::replace_candidate_snapshot(), and snapshot_from_directory().

| std::string arachne::penelope::anonymous_namespace{store.cpp}::require_string | ( | const json & | object, |
| std::string_view | key, | ||
| std::string_view | context ) |
Definition at line 311 of file store.cpp.
| void arachne::penelope::anonymous_namespace{store.cpp}::require_valid_contract | ( | arachnespace::contracts::contract_name | expected, |
| const json & | document, | ||
| std::string_view | context ) |
Definition at line 1382 of file store.cpp.
| fs::path arachne::penelope::anonymous_namespace{store.cpp}::schema_path | ( | std::string_view | filename | ) |
Definition at line 387 of file store.cpp.
| void arachne::penelope::anonymous_namespace{store.cpp}::seal_and_validate_database | ( | const graph_domain | domain, |
| const fs::path & | database_path ) |
Definition at line 1105 of file store.cpp.
References configure_connection(), arachne::penelope::anonymous_namespace{store.cpp}::database::database(), arachne::penelope::anonymous_namespace{store.cpp}::database::get(), arachne::penelope::anonymous_namespace{store.cpp}::statement::get(), immutable_readonly, inspect_database(), arachne::penelope::integrity_report::ok, and arachne::penelope::anonymous_namespace{store.cpp}::statement::row().
Referenced by arachne::penelope::store::checkpoint_staging().


| snapshot_result arachne::penelope::anonymous_namespace{store.cpp}::snapshot_from_directory | ( | const fs::path & | root, |
| graph_domain | domain, | ||
| std::string | id, | ||
| bool | verify_hashes ) |
Definition at line 1192 of file store.cpp.
References arachne::penelope::snapshot_result::database_sha256, arachne::penelope::snapshot_result::domain, domain_path(), arachne::penelope::snapshot_result::export_sha256, require_sha256(), arachnespace::contracts::research_candidate_graph_snapshot, arachne::crypto::sha256_file(), and arachne::penelope::snapshot_result::snapshot_id.
Referenced by finalize_snapshot().


| std::string arachne::penelope::anonymous_namespace{store.cpp}::sqlite_immutable_uri | ( | const fs::path & | path | ) |
Definition at line 128 of file store.cpp.
Referenced by arachne::penelope::anonymous_namespace{store.cpp}::database::database().

| std::string arachne::penelope::anonymous_namespace{store.cpp}::sqlite_message | ( | sqlite3 * | db, |
| std::string_view | operation ) |
| json arachne::penelope::anonymous_namespace{store.cpp}::sqlite_value | ( | sqlite3_stmt * | statement_value, |
| int | column ) |
Definition at line 1164 of file store.cpp.
| std::string arachne::penelope::anonymous_namespace{store.cpp}::utc_now | ( | ) |
Definition at line 1468 of file store.cpp.
| void arachne::penelope::anonymous_namespace{store.cpp}::validate_stable_contract_id | ( | std::string_view | value, |
| std::string_view | context ) |
Definition at line 524 of file store.cpp.
Referenced by import_candidate_plan().

| void arachne::penelope::anonymous_namespace{store.cpp}::write_active_id | ( | const fs::path & | root, |
| graph_domain | domain, | ||
| std::string_view | id ) |
Definition at line 434 of file store.cpp.
References domain_path(), and arachne::crypto::sha256().
Referenced by finalize_snapshot().


| void arachne::penelope::anonymous_namespace{store.cpp}::write_bytes | ( | const fs::path & | path, |
| std::string_view | bytes ) |
| json arachne::penelope::anonymous_namespace{store.cpp}::write_validation_report | ( | const fs::path & | staging_path, |
| graph_domain | domain, | ||
| std::string_view | snapshot_id ) |
Definition at line 1496 of file store.cpp.
References domain_name().
