neo4j-ruby-driver 1.7.6 → 4.4.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -42
- data/lib/loader.rb +2 -1
- 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/driver/version.rb +1 -1
- 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 +91 -0
- data/ruby/neo4j/driver/graph_database.rb +140 -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 +77 -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 +76 -0
- data/ruby/neo4j/driver/internal/cursor/async_result_cursor_only_factory.rb +29 -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 +127 -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 +174 -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 +37 -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 +79 -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 +32 -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 +33 -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 +39 -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 +30 -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 +92 -0
- data/ruby/neo4j/driver/internal/security_setting.rb +73 -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/ruby/neo4j/driver.rb +30 -0
- metadata +266 -91
- 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
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Summary
|
7
|
-
class InternalSummaryCounters
|
8
|
-
def initialize(stats)
|
9
|
-
@stats = stats || RecursiveOpenStruct.new
|
10
|
-
end
|
11
|
-
|
12
|
-
def contains_updates?
|
13
|
-
@stats.to_h.values.any?(&:positive?)
|
14
|
-
end
|
15
|
-
|
16
|
-
def method_missing(method)
|
17
|
-
@stats.send(method) || 0
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Util
|
7
|
-
class MetadataExtractor
|
8
|
-
def initialize(result_available_after_metadata_key, result_consumed_after_metadata_key); end
|
9
|
-
|
10
|
-
def extract_bookmarks(metadata); end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module BaseTimeValue
|
8
|
-
NANO_FACTOR = 1_000_000_000
|
9
|
-
|
10
|
-
def time(nano_of_day_local, offset_seconds = nil)
|
11
|
-
min, sec = Rational(nano_of_day_local, NANO_FACTOR).divmod(60)
|
12
|
-
Time.new(0, 1, 1, *min.divmod(60), sec, offset_seconds)
|
13
|
-
end
|
14
|
-
|
15
|
-
def to_neo_values(local_time)
|
16
|
-
((local_time.hour * 60 + local_time.min) * 60 + local_time.sec) * NANO_FACTOR + local_time.nsec
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module DateValue
|
8
|
-
CODE = :D
|
9
|
-
extend StructureValue
|
10
|
-
EPOCH = Date.parse('1970-01-01')
|
11
|
-
|
12
|
-
class << self
|
13
|
-
def to_ruby_value(epoch_day)
|
14
|
-
EPOCH + epoch_day
|
15
|
-
end
|
16
|
-
|
17
|
-
def to_neo_values(date)
|
18
|
-
(date - EPOCH).to_i
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module DurationValue
|
8
|
-
CODE = :E
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def to_ruby_value(months, days, seconds, nanoseconds)
|
13
|
-
ActiveSupport::Duration.months(months) +
|
14
|
-
ActiveSupport::Duration.days(days) +
|
15
|
-
ActiveSupport::Duration.seconds(seconds) +
|
16
|
-
ActiveSupport::Duration.seconds(nanoseconds * BigDecimal('1e-9'))
|
17
|
-
end
|
18
|
-
|
19
|
-
def to_neo_values(object)
|
20
|
-
DurationNormalizer.normalize(object)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module LocalDateTimeValue
|
8
|
-
CODE = :d
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def to_ruby_value(epoch_second_utc, nsec)
|
13
|
-
Types::LocalDateTime.new(Time.at(epoch_second_utc, nsec, :nsec).utc)
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_neo_values(local_date_time)
|
17
|
-
[local_date_time.to_i, local_date_time.nsec]
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module LocalTimeValue
|
8
|
-
CODE = :t
|
9
|
-
extend StructureValue
|
10
|
-
extend BaseTimeValue
|
11
|
-
|
12
|
-
def self.to_ruby_value(nano_of_day_local)
|
13
|
-
Types::LocalTime.new(time(nano_of_day_local))
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module NodeValue
|
8
|
-
CODE = :N
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
def self.to_ruby_value(id, labels, properties)
|
12
|
-
Types::Node.new(id, labels.map(&:to_sym), properties)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module OffsetTimeValue
|
8
|
-
CODE = :T
|
9
|
-
extend StructureValue
|
10
|
-
extend BaseTimeValue
|
11
|
-
|
12
|
-
class << self
|
13
|
-
def to_ruby_value(nano_of_day_local, offset_seconds)
|
14
|
-
Types::OffsetTime.new(time(nano_of_day_local, offset_seconds))
|
15
|
-
end
|
16
|
-
|
17
|
-
def to_neo_values(offset_time)
|
18
|
-
[super, offset_time.utc_offset]
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module PathValue
|
8
|
-
CODE = :P
|
9
|
-
extend StructureValue
|
10
|
-
class << self
|
11
|
-
def to_ruby_value(uniq_nodes, uniq_rels, sequence)
|
12
|
-
prev_node = uniq_nodes.first
|
13
|
-
nodes = [prev_node] # Start node is always 0, and isn't encoded in the sequence
|
14
|
-
rels = []
|
15
|
-
path = Types::Path.new(nodes, rels)
|
16
|
-
sequence.in_groups_of(2) do |rel_idx, node_idx|
|
17
|
-
node = uniq_nodes[node_idx]
|
18
|
-
nodes << node
|
19
|
-
rel = uniq_rels[rel_idx.abs - 1] # -1 because rel idx are 1-indexed
|
20
|
-
update(rel, prev_node, node, rel_idx.negative?)
|
21
|
-
rels << rel
|
22
|
-
path << Types::Path::Segment.new(prev_node, rel, node)
|
23
|
-
prev_node = node
|
24
|
-
end
|
25
|
-
path
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
def update(rel, prev_node, node, inversed)
|
31
|
-
# Negative rel index means this rel was traversed "inversed" from its direction
|
32
|
-
prev_node, node = node, prev_node if inversed
|
33
|
-
rel.start_node_id = prev_node.id
|
34
|
-
rel.end_node_id = node.id
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module Point2DValue
|
8
|
-
CODE = :X
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def to_ruby_value(srid, x, y)
|
13
|
-
Types::Point.new(srid: srid, x: x, y: y)
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_neo_values(point)
|
17
|
-
[point.srid.to_i, *point.coordinates]
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module Point3DValue
|
8
|
-
CODE = :Y
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def to_ruby_value(srid, x, y, z)
|
13
|
-
Types::Point.new(srid: srid, x: x, y: y, z: z)
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_neo_values(point)
|
17
|
-
[point.srid.to_i, *point.coordinates]
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module RelationshipValue
|
8
|
-
CODE = :R
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
def self.to_ruby_value(id, start_node_id, end_node_id, type, properties)
|
12
|
-
Types::Relationship.new(id, start_node_id, end_node_id, type, properties)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module StructureValue
|
8
|
-
def self.extended(mod)
|
9
|
-
code = mod.const_get('CODE').to_s.getbyte(0)
|
10
|
-
(@modules ||= {})[code] = mod
|
11
|
-
mod.define_singleton_method(:code) { code }
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.to_ruby(value)
|
15
|
-
@modules[Bolt::Structure.code(value)]&.to_ruby_specific(value)
|
16
|
-
end
|
17
|
-
|
18
|
-
def to_ruby_specific(value)
|
19
|
-
to_ruby_value(*Array.new(size, &method(:ruby_value).curry.call(value)))
|
20
|
-
end
|
21
|
-
|
22
|
-
def to_neo(value, object)
|
23
|
-
Bolt::Value.format_as_structure(value, code, size)
|
24
|
-
Array(to_neo_values(object)).each_with_index do |elem, index|
|
25
|
-
ValueAdapter.to_neo(Bolt::Structure.value(value, index), elem)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def ruby_value(value, index)
|
32
|
-
ValueAdapter.to_ruby(Bolt::Structure.value(value, index))
|
33
|
-
end
|
34
|
-
|
35
|
-
def size
|
36
|
-
@size ||= method(:to_ruby_value).arity
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module TimeWithZoneIdValue
|
8
|
-
CODE = :f
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def to_ruby_value(epoch_second_local, nsec, zone_id_string)
|
13
|
-
time = Time.at(epoch_second_local, nsec, :nsec).in_time_zone(TZInfo::Timezone.get(zone_id_string))
|
14
|
-
time - time.utc_offset
|
15
|
-
end
|
16
|
-
|
17
|
-
def to_neo_values(time)
|
18
|
-
[time.to_i + time.utc_offset, time.nsec, time.time_zone.tzinfo.identifier]
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module TimeWithZoneOffsetValue
|
8
|
-
CODE = :F
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def to_ruby_value(epoch_second_local, nsec, offset)
|
13
|
-
time = Time.at(epoch_second_local, nsec, :nsec).utc
|
14
|
-
Time.new(time.year, time.month, time.mday, time.hour, time.min, time.sec + Rational(nsec, 1_000_000_000),
|
15
|
-
offset)
|
16
|
-
# In ruby 2.6.x
|
17
|
-
# Time.at(sec, nsec, :nsec, tz: offset)
|
18
|
-
end
|
19
|
-
|
20
|
-
def to_neo_values(time)
|
21
|
-
[time.to_i + time.utc_offset, time.nsec, time.utc_offset]
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module UnboundRelationshipValue
|
8
|
-
CODE = :r
|
9
|
-
extend StructureValue
|
10
|
-
|
11
|
-
def self.to_ruby_value(id, type, properties)
|
12
|
-
Types::Relationship.new(id, nil, nil, type, properties)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,101 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Internal
|
6
|
-
module Value
|
7
|
-
module ValueAdapter
|
8
|
-
class << self
|
9
|
-
def to_ruby(value)
|
10
|
-
case Bolt::Value.type(value)
|
11
|
-
when :bolt_null
|
12
|
-
nil
|
13
|
-
when :bolt_boolean
|
14
|
-
Bolt::Boolean.get(value) == 1
|
15
|
-
when :bolt_integer
|
16
|
-
Bolt::Integer.get(value)
|
17
|
-
when :bolt_float
|
18
|
-
Bolt::Float.get(value)
|
19
|
-
when :bolt_bytes
|
20
|
-
Types::Bytes.new(Array.new(Bolt::Value.size(value)) { |i| Bolt::Bytes.get(value, i) }.pack('C*'))
|
21
|
-
when :bolt_string
|
22
|
-
Bolt::String.get(value).read_string(Bolt::Value.size(value)).force_encoding(Encoding::UTF_8)
|
23
|
-
when :bolt_dictionary
|
24
|
-
Array.new(Bolt::Value.size(value)) do |i|
|
25
|
-
[to_ruby(Bolt::Dictionary.key(value, i)).to_sym, to_ruby(Bolt::Dictionary.value(value, i))]
|
26
|
-
end.to_h
|
27
|
-
when :bolt_list
|
28
|
-
Array.new(Bolt::Value.size(value)) { |i| to_ruby(Bolt::List.value(value, i)) }
|
29
|
-
when :bolt_structure
|
30
|
-
StructureValue.to_ruby(value)
|
31
|
-
else
|
32
|
-
raise Exception, 'unsupported neo4j type'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def to_neo(value, object)
|
37
|
-
case object
|
38
|
-
when nil
|
39
|
-
Bolt::Value.format_as_null(value)
|
40
|
-
when TrueClass
|
41
|
-
Bolt::Value.format_as_boolean(value, 1)
|
42
|
-
when FalseClass
|
43
|
-
Bolt::Value.format_as_boolean(value, 0)
|
44
|
-
when Integer
|
45
|
-
Bolt::Value.format_as_integer(value, object)
|
46
|
-
when Float
|
47
|
-
Bolt::Value.format_as_float(value, object)
|
48
|
-
when Types::Bytes
|
49
|
-
Bolt::Value.format_as_bytes(value, object, object.size)
|
50
|
-
when String
|
51
|
-
object = object.encode(Encoding::UTF_8) unless object.encoding == Encoding::UTF_8
|
52
|
-
Bolt::Value.format_as_string(value, object, object.bytesize)
|
53
|
-
when Symbol
|
54
|
-
to_neo(value, object.to_s)
|
55
|
-
when Hash
|
56
|
-
Bolt::Value.format_as_dictionary(value, object.size)
|
57
|
-
object.each_with_index do |(key, elem), index|
|
58
|
-
key = key.to_s
|
59
|
-
Bolt::Dictionary.set_key(value, index, key, key.bytesize)
|
60
|
-
to_neo(Bolt::Dictionary.value(value, index), elem)
|
61
|
-
end
|
62
|
-
when Types::Path
|
63
|
-
Exceptions::ClientException.unable_to_convert(object)
|
64
|
-
when Enumerable
|
65
|
-
object = object.to_a
|
66
|
-
Bolt::Value.format_as_list(value, object.size)
|
67
|
-
object.each_with_index { |elem, index| to_neo(Bolt::List.value(value, index), elem) }
|
68
|
-
when ActiveSupport::Duration
|
69
|
-
DurationValue.to_neo(value, object)
|
70
|
-
when Neo4j::Driver::Types::Point
|
71
|
-
case object.coordinates.size
|
72
|
-
when 2
|
73
|
-
Point2DValue
|
74
|
-
when 3
|
75
|
-
Point3DValue
|
76
|
-
else
|
77
|
-
raise Exception
|
78
|
-
end&.to_neo(value, object)
|
79
|
-
when Types::OffsetTime
|
80
|
-
OffsetTimeValue.to_neo(value, object)
|
81
|
-
when Types::LocalTime
|
82
|
-
LocalTimeValue.to_neo(value, object)
|
83
|
-
when Types::LocalDateTime
|
84
|
-
LocalDateTimeValue.to_neo(value, object)
|
85
|
-
when ActiveSupport::TimeWithZone
|
86
|
-
TimeWithZoneIdValue.to_neo(value, object)
|
87
|
-
when Time, DateTime
|
88
|
-
TimeWithZoneOffsetValue.to_neo(value, object)
|
89
|
-
when Date
|
90
|
-
DateValue.to_neo(value, object)
|
91
|
-
else
|
92
|
-
Exceptions::ClientException.unable_to_convert(object)
|
93
|
-
end
|
94
|
-
value
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
class Statement
|
6
|
-
attr_reader :text, :parameters
|
7
|
-
|
8
|
-
def initialize(text, parameters = nil)
|
9
|
-
Internal::Validator.require_hash_parameters!(parameters)
|
10
|
-
@text = text
|
11
|
-
@parameters = parameters || {}
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Types
|
6
|
-
class Entity
|
7
|
-
attr_reader :id, :properties
|
8
|
-
delegate :[], to: :properties
|
9
|
-
|
10
|
-
def initialize(id, properties)
|
11
|
-
@id = id
|
12
|
-
@properties = properties
|
13
|
-
end
|
14
|
-
|
15
|
-
def ==(other)
|
16
|
-
self.class == other.class && id == other.id
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Types
|
6
|
-
class Path < Array
|
7
|
-
attr_reader :nodes, :relationships
|
8
|
-
|
9
|
-
class Segment
|
10
|
-
attr_reader :start_node, :relationship, :end_node
|
11
|
-
|
12
|
-
def initialize(start_node, relationship, end_node)
|
13
|
-
@start_node = start_node
|
14
|
-
@relationship = relationship
|
15
|
-
@end_node = end_node
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def initialize(nodes, relationships)
|
20
|
-
super()
|
21
|
-
@nodes = nodes
|
22
|
-
@relationships = relationships
|
23
|
-
end
|
24
|
-
|
25
|
-
def start_node
|
26
|
-
@nodes.first
|
27
|
-
end
|
28
|
-
|
29
|
-
def end_node
|
30
|
-
@nodes.last
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Neo4j
|
4
|
-
module Driver
|
5
|
-
module Types
|
6
|
-
class Relationship < Entity
|
7
|
-
attr_accessor :start_node_id, :end_node_id
|
8
|
-
attr_reader :type
|
9
|
-
|
10
|
-
def initialize(id, start_node_id, end_node_id, type, properties)
|
11
|
-
super(id, properties)
|
12
|
-
@start_node_id = start_node_id
|
13
|
-
@end_node_id = end_node_id
|
14
|
-
@type = type.to_sym
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|