neo4j-ruby-driver 1.7.6 → 4.4.0.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -43
- data/lib/loader.rb +5 -3
- data/lib/neo4j/driver/auto_closable.rb +2 -2
- data/lib/neo4j/driver/exceptions/authentication_exception.rb +6 -1
- data/lib/neo4j/driver/exceptions/authorization_expired_exception.rb +14 -0
- data/lib/neo4j/driver/{types/bytes.rb → exceptions/certificate_exception.rb} +2 -2
- data/lib/neo4j/driver/exceptions/client_exception.rb +3 -0
- data/lib/neo4j/driver/exceptions/connection_read_timeout_exception.rb +14 -0
- data/lib/neo4j/driver/exceptions/database_exception.rb +3 -0
- data/lib/neo4j/driver/exceptions/discovery_exception.rb +16 -0
- data/lib/neo4j/driver/exceptions/fatal_discovery_exception.rb +13 -0
- data/lib/neo4j/driver/exceptions/protocol_exception.rb +7 -0
- data/lib/neo4j/driver/exceptions/result_consumed_exception.rb +13 -0
- data/lib/neo4j/driver/exceptions/security_exception.rb +5 -1
- data/lib/neo4j/driver/exceptions/service_unavailable_exception.rb +2 -0
- data/lib/neo4j/driver/exceptions/session_expired_exception.rb +4 -0
- data/lib/neo4j/driver/exceptions/token_expired_exception.rb +15 -0
- data/lib/neo4j/driver/exceptions/transaction_nesting_exception.rb +11 -0
- data/lib/neo4j/driver/exceptions/transient_exception.rb +3 -0
- data/lib/neo4j/driver/exceptions/untrusted_server_exception.rb +1 -0
- data/lib/neo4j/driver/exceptions/value/lossy_coercion.rb +15 -0
- data/lib/neo4j/driver/exceptions/value/not_multi_valued.rb +13 -0
- data/lib/neo4j/driver/exceptions/value/uncoercible.rb +15 -0
- data/lib/neo4j/driver/exceptions/value/unsizable.rb +12 -0
- data/lib/neo4j/driver/exceptions/value/value_exception.rb +12 -0
- data/lib/neo4j/driver/internal/bolt_server_address.rb +97 -0
- data/lib/neo4j/driver/internal/duration_normalizer.rb +1 -1
- data/lib/neo4j/driver/internal/validator.rb +5 -4
- data/{ffi/neo4j/driver/summary/statement_type.rb → lib/neo4j/driver/summary/query_type.rb} +1 -3
- data/lib/neo4j/driver/synchronizable.rb +23 -0
- data/lib/neo4j_ruby_driver.rb +5 -11
- data/{ffi → ruby}/neo4j/driver/access_mode.rb +2 -2
- data/ruby/neo4j/driver/auth_tokens.rb +34 -0
- data/ruby/neo4j/driver/bookmark.rb +21 -0
- data/ruby/neo4j/driver/config.rb +89 -0
- data/ruby/neo4j/driver/graph_database.rb +80 -0
- data/ruby/neo4j/driver/internal/async/connection/bolt_protocol_util.rb +51 -0
- data/ruby/neo4j/driver/internal/async/connection/bootstrap_factory.rb +22 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_attributes.rb +31 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_connected_listener.rb +32 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_connector_impl.rb +83 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_pipeline_builder_impl.rb +22 -0
- data/ruby/neo4j/driver/internal/async/connection/direct_connection.rb +30 -0
- data/ruby/neo4j/driver/internal/async/connection/event_loop_group_factory.rb +83 -0
- data/ruby/neo4j/driver/internal/async/connection/handshake_completed_listener.rb +27 -0
- data/ruby/neo4j/driver/internal/async/connection/handshake_handler.rb +113 -0
- data/ruby/neo4j/driver/internal/async/connection/netty_channel_initializer.rb +57 -0
- data/ruby/neo4j/driver/internal/async/connection/netty_domain_name_resolver.rb +26 -0
- data/ruby/neo4j/driver/internal/async/connection/netty_domain_name_resolver_group.rb +19 -0
- data/ruby/neo4j/driver/internal/async/connection/routing_connection.rb +36 -0
- data/ruby/neo4j/driver/internal/async/connection/stream.rb +12 -0
- data/ruby/neo4j/driver/internal/async/connection/stream_reader.rb +16 -0
- data/ruby/neo4j/driver/internal/async/connection_context.rb +10 -0
- data/ruby/neo4j/driver/internal/async/immutable_connection_context.rb +24 -0
- data/ruby/neo4j/driver/internal/async/inbound/byte_buf_input.rb +30 -0
- data/ruby/neo4j/driver/internal/async/inbound/channel_error_handler.rb +77 -0
- data/ruby/neo4j/driver/internal/async/inbound/chunk_decoder.rb +41 -0
- data/ruby/neo4j/driver/internal/async/inbound/connect_timeout_handler.rb +32 -0
- data/ruby/neo4j/driver/internal/async/inbound/connection_read_timeout_handler.rb +17 -0
- data/ruby/neo4j/driver/internal/async/inbound/inbound_message_dispatcher.rb +172 -0
- data/ruby/neo4j/driver/internal/async/inbound/inbound_message_handler.rb +42 -0
- data/ruby/neo4j/driver/internal/async/inbound/message_decoder.rb +51 -0
- data/ruby/neo4j/driver/internal/async/internal_async_session.rb +98 -0
- data/ruby/neo4j/driver/internal/async/internal_async_transaction.rb +13 -0
- data/ruby/neo4j/driver/internal/async/leak_logging_network_session.rb +34 -0
- data/ruby/neo4j/driver/internal/async/network_connection.rb +196 -0
- data/ruby/neo4j/driver/internal/async/network_session.rb +152 -0
- data/ruby/neo4j/driver/internal/async/outbound/chunk_aware_byte_buf_output.rb +110 -0
- data/ruby/neo4j/driver/internal/async/outbound/outbound_message_handler.rb +39 -0
- data/ruby/neo4j/driver/internal/async/pool/channel.rb +63 -0
- data/ruby/neo4j/driver/internal/async/pool/connection_pool_impl.rb +149 -0
- data/ruby/neo4j/driver/internal/async/pool/controller.rb +25 -0
- data/ruby/neo4j/driver/internal/async/pool/netty_channel_health_checker.rb +87 -0
- data/ruby/neo4j/driver/internal/async/pool/netty_channel_pool.rb +52 -0
- data/ruby/neo4j/driver/internal/async/pool/netty_channel_tracker.rb +137 -0
- data/ruby/neo4j/driver/internal/async/pool/network_connection_factory.rb +21 -0
- data/ruby/neo4j/driver/internal/async/pool/pool_settings.rb +34 -0
- data/ruby/neo4j/driver/internal/async/result_cursors_holder.rb +17 -0
- data/ruby/neo4j/driver/internal/async/unmanaged_transaction.rb +214 -0
- data/ruby/neo4j/driver/internal/bookmark_holder.rb +9 -0
- data/ruby/neo4j/driver/internal/cluster/cluster_composition.rb +58 -0
- data/ruby/neo4j/driver/internal/cluster/cluster_composition_lookup_result.rb +14 -0
- data/ruby/neo4j/driver/internal/cluster/cluster_routing_table.rb +139 -0
- data/ruby/neo4j/driver/internal/cluster/identity_resolver.rb +13 -0
- data/ruby/neo4j/driver/internal/cluster/loadbalancing/least_connected_load_balancing_strategy.rb +68 -0
- data/ruby/neo4j/driver/internal/cluster/loadbalancing/load_balancer.rb +159 -0
- data/ruby/neo4j/driver/internal/cluster/loadbalancing/round_robin_array_index.rb +13 -0
- data/ruby/neo4j/driver/internal/cluster/multi_databases_routing_procedure_runner.rb +34 -0
- data/ruby/neo4j/driver/internal/cluster/rediscovery_impl.rb +238 -0
- data/ruby/neo4j/driver/internal/cluster/route_message_routing_procedure_runner.rb +43 -0
- data/ruby/neo4j/driver/internal/cluster/routing_context.rb +77 -0
- data/ruby/neo4j/driver/internal/cluster/routing_procedure_cluster_composition_provider.rb +64 -0
- data/ruby/neo4j/driver/internal/cluster/routing_procedure_response.rb +19 -0
- data/ruby/neo4j/driver/internal/cluster/routing_settings.rb +24 -0
- data/ruby/neo4j/driver/internal/cluster/routing_table_handler_impl.rb +116 -0
- data/ruby/neo4j/driver/internal/cluster/routing_table_registry_impl.rb +140 -0
- data/ruby/neo4j/driver/internal/cluster/single_database_routing_procedure_runner.rb +76 -0
- data/ruby/neo4j/driver/internal/connection_settings.rb +16 -0
- data/ruby/neo4j/driver/internal/cursor/async_result_cursor_impl.rb +68 -0
- data/ruby/neo4j/driver/internal/cursor/async_result_cursor_only_factory.rb +28 -0
- data/ruby/neo4j/driver/internal/cursor/disposable_async_result_cursor.rb +59 -0
- data/ruby/neo4j/driver/internal/cursor/result_cursor_factory_impl.rb +29 -0
- data/ruby/neo4j/driver/internal/cursor/rx_result_cursor_impl.rb +110 -0
- data/ruby/neo4j/driver/internal/database_name.rb +12 -0
- data/ruby/neo4j/driver/internal/database_name_util.rb +37 -0
- data/ruby/neo4j/driver/internal/default_bookmark_holder.rb +15 -0
- data/ruby/neo4j/driver/internal/default_domain_name_resolver.rb +11 -0
- data/ruby/neo4j/driver/internal/direct_connection_provider.rb +40 -0
- data/ruby/neo4j/driver/internal/driver_factory.rb +126 -0
- data/ruby/neo4j/driver/internal/handlers/begin_tx_response_handler.rb +20 -0
- data/ruby/neo4j/driver/internal/handlers/channel_releasing_reset_response_handler.rb +29 -0
- data/ruby/neo4j/driver/internal/handlers/commit_tx_response_handler.rb +25 -0
- data/ruby/neo4j/driver/internal/handlers/hello_response_handler.rb +65 -0
- data/ruby/neo4j/driver/internal/handlers/init_response_handler.rb +34 -0
- data/ruby/neo4j/driver/internal/handlers/legacy_pull_all_response_handler.rb +228 -0
- data/ruby/neo4j/driver/internal/handlers/no_op_response_handler.rb +16 -0
- data/ruby/neo4j/driver/internal/handlers/ping_response_handler.rb +29 -0
- data/ruby/neo4j/driver/internal/handlers/pull_handlers.rb +32 -0
- data/ruby/neo4j/driver/internal/handlers/pulln/auto_pull_response_handler.rb +178 -0
- data/ruby/neo4j/driver/internal/handlers/pulln/basic_pull_response_handler.rb +288 -0
- data/ruby/neo4j/driver/internal/handlers/pulln/fetch_size_util.rb +20 -0
- data/ruby/neo4j/driver/internal/handlers/reset_response_handler.rb +34 -0
- data/ruby/neo4j/driver/internal/handlers/rollback_tx_response_handler.rb +19 -0
- data/ruby/neo4j/driver/internal/handlers/route_message_response_handler.rb +21 -0
- data/ruby/neo4j/driver/internal/handlers/routing_response_handler.rb +70 -0
- data/ruby/neo4j/driver/internal/handlers/run_response_handler.rb +38 -0
- data/ruby/neo4j/driver/internal/handlers/session_pull_response_completion_listener.rb +34 -0
- data/ruby/neo4j/driver/internal/handlers/transaction_pull_response_completion_listener.rb +20 -0
- data/ruby/neo4j/driver/internal/impersonation_util.rb +22 -0
- data/ruby/neo4j/driver/internal/internal_bookmark.rb +38 -0
- data/ruby/neo4j/driver/internal/internal_database_name.rb +11 -0
- data/ruby/neo4j/driver/internal/internal_driver.rb +78 -0
- data/ruby/neo4j/driver/internal/internal_entity.rb +22 -0
- data/ruby/neo4j/driver/internal/internal_node.rb +21 -0
- data/ruby/neo4j/driver/internal/internal_pair.rb +9 -0
- data/ruby/neo4j/driver/internal/internal_path.rb +35 -0
- data/ruby/neo4j/driver/internal/internal_point2_d.rb +9 -0
- data/ruby/neo4j/driver/internal/internal_point3_d.rb +6 -0
- data/{ffi → ruby}/neo4j/driver/internal/internal_record.rb +2 -1
- data/ruby/neo4j/driver/internal/internal_relationship.rb +26 -0
- data/ruby/neo4j/driver/internal/internal_result.rb +60 -0
- data/ruby/neo4j/driver/internal/internal_session.rb +81 -0
- data/ruby/neo4j/driver/internal/internal_transaction.rb +48 -0
- data/ruby/neo4j/driver/internal/logging/channel_activity_logger.rb +29 -0
- data/ruby/neo4j/driver/internal/logging/channel_error_logger.rb +17 -0
- data/ruby/neo4j/driver/internal/logging/prefixed_logger.rb +19 -0
- data/ruby/neo4j/driver/internal/logging/reformatted_logger.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/abstract_message_writer.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/bolt_protocol.rb +30 -0
- data/ruby/neo4j/driver/internal/messaging/bolt_protocol_version.rb +46 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_message_reader.rb +51 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_value.rb +31 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_value_packer.rb +101 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_value_unpacker.rb +234 -0
- data/ruby/neo4j/driver/internal/messaging/encode/begin_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/commit_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/discard_all_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/discard_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/goodbye_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/hello_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/init_message_encoder.rb +16 -0
- data/ruby/neo4j/driver/internal/messaging/encode/pull_all_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/pull_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/reset_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/rollback_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/route_message_encoder.rb +18 -0
- data/ruby/neo4j/driver/internal/messaging/encode/route_v44_message_encoder.rb +27 -0
- data/ruby/neo4j/driver/internal/messaging/encode/run_message_encoder.rb +16 -0
- data/ruby/neo4j/driver/internal/messaging/encode/run_with_metadata_message_encoder.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/request/abstract_streaming_message.rb +22 -0
- data/ruby/neo4j/driver/internal/messaging/request/begin_message.rb +26 -0
- data/ruby/neo4j/driver/internal/messaging/request/commit_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/discard_all_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/discard_message.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/request/goodbye_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/hello_message.rb +31 -0
- data/ruby/neo4j/driver/internal/messaging/request/init_message.rb +19 -0
- data/ruby/neo4j/driver/internal/messaging/request/message_with_metadata.rb +10 -0
- data/ruby/neo4j/driver/internal/messaging/request/multi_database_util.rb +26 -0
- data/ruby/neo4j/driver/internal/messaging/request/pull_all_message.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/request/pull_message.rb +22 -0
- data/ruby/neo4j/driver/internal/messaging/request/reset_message.rb +32 -0
- data/ruby/neo4j/driver/internal/messaging/request/rollback_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/route_message.rb +33 -0
- data/ruby/neo4j/driver/internal/messaging/request/run_message.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/request/run_with_metadata_message.rb +47 -0
- data/ruby/neo4j/driver/internal/messaging/request/transaction_metadata_builder.rb +24 -0
- data/ruby/neo4j/driver/internal/messaging/response/failure_message.rb +40 -0
- data/ruby/neo4j/driver/internal/messaging/response/ignored_message.rb +29 -0
- data/ruby/neo4j/driver/internal/messaging/response/record_message.rb +33 -0
- data/ruby/neo4j/driver/internal/messaging/response/success_message.rb +34 -0
- data/ruby/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb +78 -0
- data/ruby/neo4j/driver/internal/messaging/v3/message_format_v3.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/v3/message_writer_v3.rb +27 -0
- data/ruby/neo4j/driver/internal/messaging/v4/bolt_protocol_v4.rb +29 -0
- data/ruby/neo4j/driver/internal/messaging/v4/message_format_v4.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/v4/message_writer_v4.rb +28 -0
- data/ruby/neo4j/driver/internal/messaging/v41/bolt_protocol_v41.rb +25 -0
- data/ruby/neo4j/driver/internal/messaging/v42/bolt_protocol_v42.rb +13 -0
- data/ruby/neo4j/driver/internal/messaging/v43/bolt_protocol_v43.rb +19 -0
- data/ruby/neo4j/driver/internal/messaging/v43/message_format_v43.rb +18 -0
- data/ruby/neo4j/driver/internal/messaging/v43/message_writer_v43.rb +34 -0
- data/ruby/neo4j/driver/internal/messaging/v44/bolt_protocol_v44.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/v44/message_format_v44.rb +18 -0
- data/ruby/neo4j/driver/internal/messaging/v44/message_writer_v44.rb +26 -0
- data/ruby/neo4j/driver/internal/metrics/connection_pool_metrics_listener.rb +34 -0
- data/ruby/neo4j/driver/internal/metrics/internal_abstract_metrics.rb +46 -0
- data/ruby/neo4j/driver/internal/metrics/internal_connection_pool_metrics.rb +105 -0
- data/ruby/neo4j/driver/internal/metrics/internal_metrics.rb +82 -0
- data/ruby/neo4j/driver/internal/metrics/internal_metrics_provider.rb +18 -0
- data/ruby/neo4j/driver/internal/metrics/listener_event.rb +17 -0
- data/ruby/neo4j/driver/internal/metrics/metrics_provider.rb +24 -0
- data/ruby/neo4j/driver/internal/metrics/time_recorder_listener_event.rb +15 -0
- data/ruby/neo4j/driver/internal/packstream/byte_array_incompatible_packer.rb +12 -0
- data/ruby/neo4j/driver/internal/packstream/pack_input.rb +47 -0
- data/ruby/neo4j/driver/internal/packstream/pack_output.rb +39 -0
- data/ruby/neo4j/driver/internal/packstream/pack_stream.rb +326 -0
- data/ruby/neo4j/driver/internal/packstream/pack_type.rb +17 -0
- data/ruby/neo4j/driver/internal/retry/exponential_backoff_retry_logic.rb +151 -0
- data/ruby/neo4j/driver/internal/revocation_strategy.rb +19 -0
- data/ruby/neo4j/driver/internal/scheme.rb +32 -0
- data/ruby/neo4j/driver/internal/security/internal_auth_token.rb +15 -0
- data/ruby/neo4j/driver/internal/security/security_plan_impl.rb +43 -0
- data/ruby/neo4j/driver/internal/security_setting.rb +66 -0
- data/ruby/neo4j/driver/internal/session_factory_impl.rb +32 -0
- data/ruby/neo4j/driver/internal/spi/connection.rb +19 -0
- data/ruby/neo4j/driver/internal/spi/connection_pool.rb +9 -0
- data/ruby/neo4j/driver/internal/spi/response_handler.rb +23 -0
- data/ruby/neo4j/driver/internal/summary/internal_database_info.rb +7 -0
- data/ruby/neo4j/driver/internal/summary/internal_input_position.rb +11 -0
- data/ruby/neo4j/driver/internal/summary/internal_notification.rb +16 -0
- data/ruby/neo4j/driver/internal/summary/internal_plan.rb +41 -0
- data/ruby/neo4j/driver/internal/summary/internal_profiled_plan.rb +32 -0
- data/ruby/neo4j/driver/internal/summary/internal_result_summary.rb +33 -0
- data/ruby/neo4j/driver/internal/summary/internal_server_info.rb +6 -0
- data/ruby/neo4j/driver/internal/summary/internal_summary_counters.rb +18 -0
- data/ruby/neo4j/driver/internal/svm/netty_substitutions.rb +196 -0
- data/ruby/neo4j/driver/internal/svm/z_lib_substitutions.rb +21 -0
- data/ruby/neo4j/driver/internal/util/certificate_tool.rb +65 -0
- data/ruby/neo4j/driver/internal/util/clock.rb +29 -0
- data/ruby/neo4j/driver/internal/util/error_util.rb +104 -0
- data/ruby/neo4j/driver/internal/util/extract.rb +123 -0
- data/ruby/neo4j/driver/internal/util/format.rb +39 -0
- data/ruby/neo4j/driver/internal/util/futures.rb +99 -0
- data/ruby/neo4j/driver/internal/util/iterables.rb +35 -0
- data/ruby/neo4j/driver/internal/util/lock_util.rb +23 -0
- data/ruby/neo4j/driver/internal/util/metadata_extractor.rb +109 -0
- data/ruby/neo4j/driver/internal/util/mutex.rb +9 -0
- data/ruby/neo4j/driver/internal/util/preconditions.rb +16 -0
- data/ruby/neo4j/driver/internal/util/server_version.rb +60 -0
- data/ruby/neo4j/driver/logging1.rb +51 -0
- data/ruby/neo4j/driver/net/server_address1.rb +9 -0
- data/ruby/neo4j/driver/query.rb +48 -0
- data/ruby/neo4j/driver/records.rb +13 -0
- data/ruby/neo4j/driver/session_config.rb +15 -0
- data/ruby/neo4j/driver/transaction_config.rb +46 -0
- data/ruby/neo4j/driver/values.rb +26 -0
- data/{lib → ruby}/neo4j/driver/version.rb +1 -1
- data/ruby/neo4j/driver.rb +30 -0
- metadata +267 -92
- data/ffi/bolt/address.rb +0 -11
- data/ffi/bolt/address_resolver.rb +0 -12
- data/ffi/bolt/address_set.rb +0 -9
- data/ffi/bolt/auth.rb +0 -10
- data/ffi/bolt/auto_releasable.rb +0 -22
- data/ffi/bolt/boolean.rb +0 -9
- data/ffi/bolt/bytes.rb +0 -10
- data/ffi/bolt/config.rb +0 -45
- data/ffi/bolt/connection.rb +0 -44
- data/ffi/bolt/connector.rb +0 -17
- data/ffi/bolt/dictionary.rb +0 -15
- data/ffi/bolt/error.rb +0 -74
- data/ffi/bolt/float.rb +0 -9
- data/ffi/bolt/integer.rb +0 -9
- data/ffi/bolt/library.rb +0 -12
- data/ffi/bolt/lifecycle.rb +0 -9
- data/ffi/bolt/list.rb +0 -10
- data/ffi/bolt/log.rb +0 -16
- data/ffi/bolt/socket_options.rb +0 -14
- data/ffi/bolt/status.rb +0 -25
- data/ffi/bolt/string.rb +0 -9
- data/ffi/bolt/structure.rb +0 -10
- data/ffi/bolt/value.rb +0 -35
- data/ffi/neo4j/driver/auth_tokens.rb +0 -18
- data/ffi/neo4j/driver/config.rb +0 -40
- data/ffi/neo4j/driver/graph_database.rb +0 -52
- data/ffi/neo4j/driver/internal/async/access_mode_connection.rb +0 -19
- data/ffi/neo4j/driver/internal/async/direct_connection.rb +0 -106
- data/ffi/neo4j/driver/internal/bolt_server_address.rb +0 -18
- data/ffi/neo4j/driver/internal/bookmarks_holder.rb +0 -30
- data/ffi/neo4j/driver/internal/direct_connection_provider.rb +0 -28
- data/ffi/neo4j/driver/internal/driver_factory.rb +0 -126
- data/ffi/neo4j/driver/internal/error_handling.rb +0 -112
- data/ffi/neo4j/driver/internal/explicit_transaction.rb +0 -146
- data/ffi/neo4j/driver/internal/handlers/pull_all_response_handler.rb +0 -104
- data/ffi/neo4j/driver/internal/handlers/response_handler.rb +0 -49
- data/ffi/neo4j/driver/internal/handlers/run_response_handler.rb +0 -32
- data/ffi/neo4j/driver/internal/handlers/session_pull_all_response_handler.rb +0 -32
- data/ffi/neo4j/driver/internal/handlers/transaction_pull_all_response_handler.rb +0 -23
- data/ffi/neo4j/driver/internal/internal_driver.rb +0 -45
- data/ffi/neo4j/driver/internal/internal_logger.rb +0 -32
- data/ffi/neo4j/driver/internal/internal_resolver.rb +0 -31
- data/ffi/neo4j/driver/internal/internal_statement_result.rb +0 -52
- data/ffi/neo4j/driver/internal/messaging/bolt_protocol.rb +0 -24
- data/ffi/neo4j/driver/internal/messaging/v1/bolt_protocol_v1.rb +0 -59
- data/ffi/neo4j/driver/internal/messaging/v2/bolt_protocol_v2.rb +0 -16
- data/ffi/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb +0 -63
- data/ffi/neo4j/driver/internal/network_session.rb +0 -129
- data/ffi/neo4j/driver/internal/retry/exponential_backoff_retry_logic.rb +0 -80
- data/ffi/neo4j/driver/internal/session_factory_impl.rb +0 -28
- data/ffi/neo4j/driver/internal/summary/internal_result_summary.rb +0 -67
- data/ffi/neo4j/driver/internal/summary/internal_server_info.rb +0 -19
- data/ffi/neo4j/driver/internal/summary/internal_summary_counters.rb +0 -23
- data/ffi/neo4j/driver/internal/util/metadata_extractor.rb +0 -15
- data/ffi/neo4j/driver/internal/value/base_time_value.rb +0 -22
- data/ffi/neo4j/driver/internal/value/date_value.rb +0 -25
- data/ffi/neo4j/driver/internal/value/duration_value.rb +0 -27
- data/ffi/neo4j/driver/internal/value/local_date_time_value.rb +0 -24
- data/ffi/neo4j/driver/internal/value/local_time_value.rb +0 -19
- data/ffi/neo4j/driver/internal/value/node_value.rb +0 -18
- data/ffi/neo4j/driver/internal/value/offset_time_value.rb +0 -25
- data/ffi/neo4j/driver/internal/value/path_value.rb +0 -41
- data/ffi/neo4j/driver/internal/value/point2_d_value.rb +0 -24
- data/ffi/neo4j/driver/internal/value/point3_d_value.rb +0 -24
- data/ffi/neo4j/driver/internal/value/relationship_value.rb +0 -18
- data/ffi/neo4j/driver/internal/value/structure_value.rb +0 -42
- data/ffi/neo4j/driver/internal/value/time_with_zone_id_value.rb +0 -25
- data/ffi/neo4j/driver/internal/value/time_with_zone_offset_value.rb +0 -28
- data/ffi/neo4j/driver/internal/value/unbound_relationship_value.rb +0 -18
- data/ffi/neo4j/driver/internal/value/value_adapter.rb +0 -101
- data/ffi/neo4j/driver/net/server_address.rb +0 -13
- data/ffi/neo4j/driver/statement.rb +0 -15
- data/ffi/neo4j/driver/types/entity.rb +0 -21
- data/ffi/neo4j/driver/types/node.rb +0 -16
- data/ffi/neo4j/driver/types/path.rb +0 -35
- data/ffi/neo4j/driver/types/relationship.rb +0 -19
- data/ffi/neo4j/driver.rb +0 -61
- data/lib/neo4j/driver/internal/ruby_signature.rb +0 -18
data/ffi/bolt/address_set.rb
DELETED
data/ffi/bolt/auth.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Auth
|
5
|
-
extend Bolt::Library
|
6
|
-
attach_function :basic, :BoltAuth_basic, %i[string string string], :auto_pointer,
|
7
|
-
releaser: Bolt::Value.method(:destroy)
|
8
|
-
attach_function :none, :BoltAuth_none, [], :auto_pointer, releaser: Bolt::Value.method(:destroy)
|
9
|
-
end
|
10
|
-
end
|
data/ffi/bolt/auto_releasable.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module AutoReleasable
|
5
|
-
def attach_function(name, func, args, returns = nil, options = nil)
|
6
|
-
return super unless returns == :auto_pointer
|
7
|
-
|
8
|
-
super(name, func, args, :pointer, options)
|
9
|
-
singleton_class.prepend with_auto_releaser(name, options&.dig(:releaser))
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
def with_auto_releaser(method, releaser)
|
15
|
-
Module.new do
|
16
|
-
define_method(method) do |*args|
|
17
|
-
FFI::AutoPointer.new(super(*args), releaser || self.method(:destroy))
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
data/ffi/bolt/boolean.rb
DELETED
data/ffi/bolt/bytes.rb
DELETED
data/ffi/bolt/config.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Config
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
BOLT_SCHEME_DIRECT = 0
|
8
|
-
BOLT_SCHEME_NEO4J = 1
|
9
|
-
|
10
|
-
typedef :int32_t, :bolt_scheme
|
11
|
-
|
12
|
-
BOLT_TRANSPORT_PLAINTEXT = 0
|
13
|
-
BOLT_TRANSPORT_ENCRYPTED = 1
|
14
|
-
|
15
|
-
typedef :int32_t, :bolt_transport
|
16
|
-
|
17
|
-
attach_function :create, :BoltConfig_create, [], :auto_pointer
|
18
|
-
attach_function :destroy, :BoltConfig_destroy, [:pointer], :void
|
19
|
-
attach_function :get_scheme, :BoltConfig_get_scheme, [:pointer], :bolt_scheme
|
20
|
-
attach_function :set_scheme, :BoltConfig_set_scheme, %i[pointer bolt_scheme], :int32_t
|
21
|
-
attach_function :get_transport, :BoltConfig_get_transport, [:pointer], :bolt_transport
|
22
|
-
attach_function :set_transport, :BoltConfig_set_transport, %i[pointer bolt_transport], :int32_t
|
23
|
-
attach_function :get_trust, :BoltConfig_get_trust, [:pointer], :pointer
|
24
|
-
attach_function :set_trust, :BoltConfig_set_trust, %i[pointer pointer], :int32_t
|
25
|
-
attach_function :get_user_agent, :BoltConfig_get_user_agent, [:pointer], :string
|
26
|
-
attach_function :set_user_agent, :BoltConfig_set_user_agent, %i[pointer string], :int32
|
27
|
-
attach_function :get_routing_context, :BoltConfig_get_routing_context, [:pointer], :pointer
|
28
|
-
attach_function :set_routing_context, :BoltConfig_set_routing_context, %i[pointer pointer], :int32_t
|
29
|
-
attach_function :get_address_resolver, :BoltConfig_get_address_resolver, [:pointer], :pointer
|
30
|
-
attach_function :set_address_resolver, :BoltConfig_set_address_resolver, %i[pointer pointer], :int32_t
|
31
|
-
attach_function :get_log, :BoltConfig_get_log, [:pointer], :pointer
|
32
|
-
attach_function :set_log, :BoltConfig_set_log, %i[pointer pointer], :int32
|
33
|
-
attach_function :get_max_pool_size, :BoltConfig_get_max_pool_size, [:pointer], :int32_t
|
34
|
-
attach_function :set_max_pool_size, :BoltConfig_set_max_pool_size, %i[pointer int32_t], :int32_t
|
35
|
-
attach_function :get_max_connection_life_time, :BoltConfig_get_max_connection_life_time, [:pointer], :int32_t
|
36
|
-
attach_function :set_max_connection_life_time, :BoltConfig_set_max_connection_life_time, %i[pointer int32_t],
|
37
|
-
:int32_t
|
38
|
-
attach_function :get_max_connection_acquisition_time, :BoltConfig_get_max_connection_acquisition_time, [:pointer],
|
39
|
-
:int32_t
|
40
|
-
attach_function :set_max_connection_acquisition_time, :BoltConfig_set_max_connection_acquisition_time,
|
41
|
-
%i[pointer int32_t], :int32_t
|
42
|
-
attach_function :get_socket_options, :BoltConfig_get_socket_options, [:pointer], :pointer
|
43
|
-
attach_function :set_socket_options, :BoltConfig_set_socket_options, %i[pointer pointer], :int32_t
|
44
|
-
end
|
45
|
-
end
|
data/ffi/bolt/connection.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Connection
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
typedef :uint64, :bolt_request
|
8
|
-
|
9
|
-
attach_function :flush, :BoltConnection_send, [:pointer], :int32
|
10
|
-
attach_function :fetch, :BoltConnection_fetch, %i[pointer bolt_request], :int32
|
11
|
-
attach_function :fetch_summary, :BoltConnection_fetch_summary, %i[pointer bolt_request], :int32
|
12
|
-
attach_function :clear_begin, :BoltConnection_clear_begin, %i[pointer], :int32
|
13
|
-
attach_function :set_begin_bookmarks, :BoltConnection_set_begin_bookmarks, %i[pointer pointer], :int32
|
14
|
-
attach_function :set_begin_tx_timeout, :BoltConnection_set_begin_tx_timeout, %i[pointer int64], :int32
|
15
|
-
attach_function :set_begin_tx_metadata, :BoltConnection_set_begin_tx_metadata, %i[pointer pointer], :int32
|
16
|
-
attach_function :load_begin_request, :BoltConnection_load_begin_request, %i[pointer], :int32
|
17
|
-
attach_function :load_commit_request, :BoltConnection_load_commit_request, %i[pointer], :int32
|
18
|
-
attach_function :load_rollback_request, :BoltConnection_load_rollback_request, %i[pointer], :int32
|
19
|
-
attach_function :clear_run, :BoltConnection_clear_run, %i[pointer], :int32
|
20
|
-
attach_function :set_run_bookmarks, :BoltConnection_set_run_bookmarks, %i[pointer pointer], :int32
|
21
|
-
attach_function :set_run_tx_timeout, :BoltConnection_set_run_tx_timeout, %i[pointer int64], :int32
|
22
|
-
attach_function :set_run_tx_metadata, :BoltConnection_set_run_tx_metadata, %i[pointer pointer], :int32
|
23
|
-
attach_function :set_run_cypher, :BoltConnection_set_run_cypher, %i[pointer string uint64 int32], :int32
|
24
|
-
attach_function :set_run_cypher_parameter, :BoltConnection_set_run_cypher_parameter,
|
25
|
-
%i[pointer int32 string uint64], :pointer
|
26
|
-
attach_function :load_run_request, :BoltConnection_load_run_request, [:pointer], :int32
|
27
|
-
attach_function :load_discard_request, :BoltConnection_load_discard_request, %i[pointer int32], :int32
|
28
|
-
attach_function :load_pull_request, :BoltConnection_load_pull_request, %i[pointer int32], :int32
|
29
|
-
attach_function :load_reset_request, :BoltConnection_load_reset_request, [:pointer], :int32
|
30
|
-
attach_function :last_request, :BoltConnection_last_request, [:pointer], :bolt_request
|
31
|
-
attach_function :server, :BoltConnection_server, %i[pointer], :strptr
|
32
|
-
attach_function :id, :BoltConnection_id, %i[pointer], :strptr
|
33
|
-
attach_function :address, :BoltConnection_address, %i[pointer], :pointer
|
34
|
-
attach_function :remote_endpoint, :BoltConnection_remote_endpoint, %i[pointer], :pointer
|
35
|
-
attach_function :local_endpoint, :BoltConnection_local_endpoint, %i[pointer], :pointer
|
36
|
-
attach_function :last_bookmark, :BoltConnection_last_bookmark, %i[pointer], :strptr
|
37
|
-
attach_function :summary_success, :BoltConnection_summary_success, [:pointer], :int32
|
38
|
-
attach_function :failure, :BoltConnection_failure, [:pointer], :pointer
|
39
|
-
attach_function :field_names, :BoltConnection_field_names, [:pointer], :pointer
|
40
|
-
attach_function :field_values, :BoltConnection_field_values, [:pointer], :pointer
|
41
|
-
attach_function :metadata, :BoltConnection_metadata, %i[pointer], :pointer
|
42
|
-
attach_function :status, :BoltConnection_status, [:pointer], :pointer
|
43
|
-
end
|
44
|
-
end
|
data/ffi/bolt/connector.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Connector
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
BoltAccessMode = enum(
|
8
|
-
:bolt_access_mode_write,
|
9
|
-
:bolt_access_mode_read
|
10
|
-
)
|
11
|
-
|
12
|
-
attach_function :create, :BoltConnector_create, %i[pointer pointer pointer], :pointer
|
13
|
-
attach_function :destroy, :BoltConnector_destroy, [:pointer], :void
|
14
|
-
attach_function :acquire, :BoltConnector_acquire, [:pointer, BoltAccessMode, :pointer], :pointer
|
15
|
-
attach_function :release, :BoltConnector_release, %i[pointer pointer], :void
|
16
|
-
end
|
17
|
-
end
|
data/ffi/bolt/dictionary.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Dictionary
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
attach_function :key, :BoltDictionary_key, %i[pointer int32], :pointer
|
8
|
-
attach_function :get_key, :BoltDictionary_get_key, %i[pointer int32], :pointer
|
9
|
-
attach_function :get_key_size, :BoltDictionary_get_key_size, %i[pointer int32], :int32
|
10
|
-
attach_function :get_key_index, :BoltDictionary_get_key_index, %i[pointer string int32 int32], :int32
|
11
|
-
attach_function :set_key, :BoltDictionary_set_key, %i[pointer int32 string int32], :int32
|
12
|
-
attach_function :value, :BoltDictionary_value, %i[pointer int32], :pointer
|
13
|
-
attach_function :value_by_key, :BoltDictionary_value_by_key, %i[pointer string int32], :pointer
|
14
|
-
end
|
15
|
-
end
|
data/ffi/bolt/error.rb
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Error
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
# Identifies a successful operation which is defined as 0
|
8
|
-
BOLT_SUCCESS = 0
|
9
|
-
# Unknown error
|
10
|
-
BOLT_UNKNOWN_ERROR = 1
|
11
|
-
# Unsupported protocol or address family
|
12
|
-
BOLT_UNSUPPORTED = 2
|
13
|
-
# Operation interrupted
|
14
|
-
BOLT_INTERRUPTED = 3
|
15
|
-
# Connection reset by peer
|
16
|
-
BOLT_CONNECTION_RESET = 4
|
17
|
-
# No valid resolved addresses found to connect
|
18
|
-
BOLT_NO_VALID_ADDRESS = 5
|
19
|
-
# Operation timed out
|
20
|
-
BOLT_TIMED_OUT = 6
|
21
|
-
# Permission denied
|
22
|
-
BOLT_PERMISSION_DENIED = 7
|
23
|
-
# Too may open files
|
24
|
-
BOLT_OUT_OF_FILES = 8
|
25
|
-
# Out of memory
|
26
|
-
BOLT_OUT_OF_MEMORY = 9
|
27
|
-
# Too many open ports
|
28
|
-
BOLT_OUT_OF_PORTS = 10
|
29
|
-
# Connection refused
|
30
|
-
BOLT_CONNECTION_REFUSED = 11
|
31
|
-
# Network unreachable
|
32
|
-
BOLT_NETWORK_UNREACHABLE = 12
|
33
|
-
# An unknown TLS error
|
34
|
-
BOLT_TLS_ERROR = 13
|
35
|
-
# Connection closed by remote peer
|
36
|
-
BOLT_END_OF_TRANSMISSION = 15
|
37
|
-
# Server returned a FAILURE message, more info available through \ref BoltConnection_failure
|
38
|
-
BOLT_SERVER_FAILURE = 16
|
39
|
-
# Unsupported bolt transport
|
40
|
-
BOLT_TRANSPORT_UNSUPPORTED = 0x400
|
41
|
-
# Unsupported protocol usage
|
42
|
-
BOLT_PROTOCOL_VIOLATION = 0x500
|
43
|
-
# Unsupported bolt type
|
44
|
-
BOLT_PROTOCOL_UNSUPPORTED_TYPE = 0x501
|
45
|
-
# Unknown pack stream type
|
46
|
-
BOLT_PROTOCOL_NOT_IMPLEMENTED_TYPE = 0x502
|
47
|
-
# Unexpected marker
|
48
|
-
BOLT_PROTOCOL_UNEXPECTED_MARKER = 0x503
|
49
|
-
# Unsupported bolt protocol version
|
50
|
-
BOLT_PROTOCOL_UNSUPPORTED = 0x504
|
51
|
-
# Connection pool is full
|
52
|
-
BOLT_POOL_FULL = 0x600
|
53
|
-
# Connection acquisition from the connection pool timed out
|
54
|
-
BOLT_POOL_ACQUISITION_TIMED_OUT = 0x601
|
55
|
-
# Address resolution failed
|
56
|
-
BOLT_ADDRESS_NOT_RESOLVED = 0x700
|
57
|
-
# Routing table retrieval failed
|
58
|
-
BOLT_ROUTING_UNABLE_TO_RETRIEVE_ROUTING_TABLE = 0x800
|
59
|
-
# No servers to select for the requested operation
|
60
|
-
BOLT_ROUTING_NO_SERVERS_TO_SELECT = 0x801
|
61
|
-
# Connection pool construction for server failed
|
62
|
-
BOLT_ROUTING_UNABLE_TO_CONSTRUCT_POOL_FOR_SERVER = 0x802
|
63
|
-
# Routing table refresh failed
|
64
|
-
BOLT_ROUTING_UNABLE_TO_REFRESH_ROUTING_TABLE = 0x803
|
65
|
-
# Invalid discovery response
|
66
|
-
BOLT_ROUTING_UNEXPECTED_DISCOVERY_RESPONSE = 0x804
|
67
|
-
# Error set in connection
|
68
|
-
BOLT_CONNECTION_HAS_MORE_INFO = 0xFFE
|
69
|
-
# Error set in connection
|
70
|
-
BOLT_STATUS_SET = 0xFFF
|
71
|
-
|
72
|
-
attach_function :get_string, :BoltError_get_string, [:int32], :string
|
73
|
-
end
|
74
|
-
end
|
data/ffi/bolt/float.rb
DELETED
data/ffi/bolt/integer.rb
DELETED
data/ffi/bolt/library.rb
DELETED
data/ffi/bolt/lifecycle.rb
DELETED
data/ffi/bolt/list.rb
DELETED
data/ffi/bolt/log.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Log
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
callback :log_func, %i[pointer string], :void
|
8
|
-
|
9
|
-
attach_function :create, :BoltLog_create, %i[pointer], :auto_pointer
|
10
|
-
attach_function :destroy, :BoltLog_destroy, %i[pointer], :void
|
11
|
-
attach_function :set_error_func, :BoltLog_set_error_func, %i[pointer log_func], :void
|
12
|
-
attach_function :set_warning_func, :BoltLog_set_warning_func, %i[pointer log_func], :void
|
13
|
-
attach_function :set_info_func, :BoltLog_set_info_func, %i[pointer log_func], :void
|
14
|
-
attach_function :set_debug_func, :BoltLog_set_debug_func, %i[pointer log_func], :void
|
15
|
-
end
|
16
|
-
end
|
data/ffi/bolt/socket_options.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module SocketOptions
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
attach_function :create, :BoltSocketOptions_create, [], :auto_pointer
|
8
|
-
attach_function :destroy, :BoltSocketOptions_destroy, [:pointer], :void
|
9
|
-
attach_function :get_connect_timeout, :BoltSocketOptions_get_connect_timeout, [:pointer], :int32_t
|
10
|
-
attach_function :set_connect_timeout, :BoltSocketOptions_set_connect_timeout, %i[pointer int32_t], :int32_t
|
11
|
-
attach_function :get_keep_alive, :BoltSocketOptions_get_keep_alive, [:pointer], :int32_t
|
12
|
-
attach_function :set_keep_alive, :BoltSocketOptions_set_keep_alive, %i[pointer int32_t], :int32_t
|
13
|
-
end
|
14
|
-
end
|
data/ffi/bolt/status.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Status
|
5
|
-
extend Bolt::Library
|
6
|
-
# Not connected
|
7
|
-
BOLT_CONNECTION_STATE_DISCONNECTED = 0
|
8
|
-
# Connected but not authenticated
|
9
|
-
BOLT_CONNECTION_STATE_CONNECTED = 1
|
10
|
-
# Connected and authenticated
|
11
|
-
BOLT_CONNECTION_STATE_READY = 2
|
12
|
-
# Recoverable failure
|
13
|
-
BOLT_CONNECTION_STATE_FAILED = 3
|
14
|
-
# Unrecoverable failure
|
15
|
-
BOLT_CONNECTION_STATE_DEFUNCT = 4
|
16
|
-
|
17
|
-
typedef :int32, :bolt_connection_state
|
18
|
-
|
19
|
-
attach_function :create, :BoltStatus_create, [], :auto_pointer
|
20
|
-
attach_function :destroy, :BoltStatus_destroy, [:pointer], :void
|
21
|
-
attach_function :get_state, :BoltStatus_get_state, [:pointer], :bolt_connection_state
|
22
|
-
attach_function :get_error, :BoltStatus_get_error, [:pointer], :int32
|
23
|
-
attach_function :get_error_context, :BoltStatus_get_error_context, [:pointer], :string
|
24
|
-
end
|
25
|
-
end
|
data/ffi/bolt/string.rb
DELETED
data/ffi/bolt/structure.rb
DELETED
data/ffi/bolt/value.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
module Value
|
5
|
-
extend Bolt::Library
|
6
|
-
|
7
|
-
enum :bolt_type,
|
8
|
-
%i[bolt_null
|
9
|
-
bolt_boolean
|
10
|
-
bolt_integer
|
11
|
-
bolt_float
|
12
|
-
bolt_string
|
13
|
-
bolt_dictionary
|
14
|
-
bolt_list
|
15
|
-
bolt_bytes
|
16
|
-
bolt_structure]
|
17
|
-
|
18
|
-
attach_function :create, :BoltValue_create, [], :auto_pointer
|
19
|
-
attach_function :destroy, :BoltValue_destroy, %i[pointer], :void
|
20
|
-
attach_function :duplicate, :BoltValue_duplicate, %i[pointer], :auto_pointer
|
21
|
-
attach_function :copy, :BoltValue_copy, %i[pointer pointer], :void
|
22
|
-
attach_function :size, :BoltValue_size, %i[pointer], :int32
|
23
|
-
attach_function :type, :BoltValue_type, %i[pointer], :bolt_type
|
24
|
-
attach_function :to_string, :BoltValue_to_string, %i[pointer pointer int32 pointer], :int32
|
25
|
-
attach_function :format_as_null, :BoltValue_format_as_Null, %i[pointer], :void
|
26
|
-
attach_function :format_as_boolean, :BoltValue_format_as_Boolean, %i[pointer char], :void
|
27
|
-
attach_function :format_as_integer, :BoltValue_format_as_Integer, %i[pointer int64], :void
|
28
|
-
attach_function :format_as_float, :BoltValue_format_as_Float, %i[pointer double], :void
|
29
|
-
attach_function :format_as_string, :BoltValue_format_as_String, %i[pointer string int32], :void
|
30
|
-
attach_function :format_as_dictionary, :BoltValue_format_as_Dictionary, %i[pointer int32], :void
|
31
|
-
attach_function :format_as_list, :BoltValue_format_as_List, %i[pointer int32], :void
|
32
|
-
attach_function :format_as_bytes, :BoltValue_format_as_Bytes, %i[pointer pointer int32], :void
|
33
|
-
attach_function :format_as_structure, :BoltValue_format_as_Structure, %i[pointer int16 int32], :void
|
34
|
-
end
|
35
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
class AuthTokens
|
6
|
-
class << self
|
7
|
-
def basic(username, password)
|
8
|
-
Internal::Validator.require_non_nil_credentials!(username, password)
|
9
|
-
Bolt::Auth.basic(username, password, nil)
|
10
|
-
end
|
11
|
-
|
12
|
-
def none
|
13
|
-
Bolt::Auth.none
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/ffi/neo4j/driver/config.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
class Config < Hash
|
6
|
-
class TrustStrategy
|
7
|
-
class << self
|
8
|
-
def trust_all_certificates; end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
class << self
|
13
|
-
# How can following Java config options be expressed in seabolt:
|
14
|
-
# withLeakedSessionsLogging
|
15
|
-
# withConnectionLivenessCheckTimeout
|
16
|
-
# withTrustStrategy TRUST_ALL_CERTIFICATES, TRUST_CUSTOM_CA_SIGNED_CERTIFICATES, TRUST_SYSTEM_CA_SIGNED_CERTIFICATE
|
17
|
-
# and in the reverse what those seabolt options correspond to in java:
|
18
|
-
# BoltConfig_set_user_agent
|
19
|
-
|
20
|
-
def default_config
|
21
|
-
{
|
22
|
-
logger: ActiveSupport::Logger.new(STDOUT, level: ::Logger::ERROR), # :set_log
|
23
|
-
leaked_session_logging: false,
|
24
|
-
#connection_liveness_check_timeout: -1, # Not configured
|
25
|
-
max_connection_lifetime: 1.hour, # :set_max_connection_life_time
|
26
|
-
max_connection_pool_size: 100, #:set_max_pool_size
|
27
|
-
connection_acquisition_timeout: 1.minute, #:set_max_connection_acquisition_time
|
28
|
-
encryption: true, # :set_transport
|
29
|
-
trust_strategy: :trust_all_certificates,
|
30
|
-
connection_timeout: 30.seconds, # BoltSocketOptions_set_connect_timeout
|
31
|
-
max_transaction_retry_time: Internal::Retry::ExponentialBackoffRetryLogic::DEFAULT_MAX_RETRY_TIME,
|
32
|
-
#resolver: nil # :set_address_resolver
|
33
|
-
keep_alive: true, # BoltSocketOptions_set_keep_alive
|
34
|
-
# ???? BoltConfig_set_user_agent
|
35
|
-
}
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
class GraphDatabase
|
6
|
-
VALID_ROUTING_SCHEMES =
|
7
|
-
[Internal::DriverFactory::BOLT_ROUTING_URI_SCHEME, Internal::DriverFactory::NEO4J_URI_SCHEME].freeze
|
8
|
-
|
9
|
-
Bolt::Lifecycle.startup
|
10
|
-
|
11
|
-
at_exit do
|
12
|
-
Bolt::Lifecycle.shutdown
|
13
|
-
end
|
14
|
-
|
15
|
-
class << self
|
16
|
-
extend AutoClosable
|
17
|
-
|
18
|
-
auto_closable :driver, :routing_driver
|
19
|
-
|
20
|
-
def driver(uri, auth_token = Neo4j::Driver::AuthTokens.none, config = nil)
|
21
|
-
unless auth_token.is_a? FFI::Pointer
|
22
|
-
raise Exceptions::AuthenticationException, 'Unsupported authentication token'
|
23
|
-
end
|
24
|
-
config = Config.default_config.merge(config || {})
|
25
|
-
|
26
|
-
Internal::DriverFactory.new.new_instance(uri, auth_token, config)
|
27
|
-
end
|
28
|
-
|
29
|
-
def routing_driver(routing_uris, auth_toke, config)
|
30
|
-
assert_routing_uris(routing_uris)
|
31
|
-
|
32
|
-
routing_uris.each do |uri|
|
33
|
-
return driver(uri, auth_toke, config)
|
34
|
-
rescue Exceptions::ServiceUnavailableException => e
|
35
|
-
# log.warn("Unable to create routing driver for URI: #{uri}", e)
|
36
|
-
end
|
37
|
-
|
38
|
-
raise Exceptions::ServiceUnavailableException, 'Failed to discover an available server'
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
def assert_routing_uris(uris)
|
44
|
-
scheme = (uris.map(&method(:URI)).map(&:scheme) - VALID_ROUTING_SCHEMES).first
|
45
|
-
return unless scheme
|
46
|
-
raise ArgumentError,
|
47
|
-
"Illegal URI scheme, expected URI scheme '#{scheme}' to be among '[#{VALID_ROUTING_SCHEMES.join ', '}]'"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Async
|
7
|
-
class AccessModeConnection
|
8
|
-
attr_reader :connection, :mode
|
9
|
-
delegate :open?, :protocol, :release, :reset, :write_and_flush, to: :connection
|
10
|
-
|
11
|
-
def initialize(connection, mode)
|
12
|
-
@connection = connection
|
13
|
-
@mode = mode
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|