cassandra-driver 3.2.0-java → 3.2.5.rc1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -30
- data/lib/cassandra.rb +3 -2
- data/lib/cassandra/address_resolution.rb +1 -1
- data/lib/cassandra/address_resolution/policies/ec2_multi_region.rb +1 -1
- data/lib/cassandra/address_resolution/policies/none.rb +1 -1
- data/lib/cassandra/aggregate.rb +1 -1
- data/lib/cassandra/argument.rb +1 -1
- data/lib/cassandra/attr_boolean.rb +1 -1
- data/lib/cassandra/auth.rb +1 -1
- data/lib/cassandra/auth/providers.rb +1 -1
- data/lib/cassandra/auth/providers/password.rb +1 -1
- data/lib/cassandra/cassandra_logger.rb +1 -1
- data/lib/cassandra/cluster.rb +1 -1
- data/lib/cassandra/cluster/client.rb +1 -1
- data/lib/cassandra/cluster/connection_pool.rb +1 -1
- data/lib/cassandra/cluster/connector.rb +1 -1
- data/lib/cassandra/cluster/control_connection.rb +1 -1
- data/lib/cassandra/cluster/failed_connection.rb +1 -1
- data/lib/cassandra/cluster/metadata.rb +1 -1
- data/lib/cassandra/cluster/options.rb +1 -1
- data/lib/cassandra/cluster/registry.rb +5 -5
- data/lib/cassandra/cluster/schema.rb +1 -1
- data/lib/cassandra/cluster/schema/cql_type_parser.rb +4 -3
- data/lib/cassandra/cluster/schema/fetchers.rb +2 -2
- data/lib/cassandra/cluster/schema/fqcn_type_parser.rb +4 -5
- data/lib/cassandra/cluster/schema/partitioners.rb +1 -1
- data/lib/cassandra/cluster/schema/partitioners/murmur3.rb +1 -1
- data/lib/cassandra/cluster/schema/partitioners/ordered.rb +1 -1
- data/lib/cassandra/cluster/schema/partitioners/random.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies/network_topology.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies/none.rb +1 -1
- data/lib/cassandra/cluster/schema/replication_strategies/simple.rb +1 -1
- data/lib/cassandra/column.rb +1 -1
- data/lib/cassandra/column_container.rb +2 -2
- data/lib/cassandra/compression.rb +1 -1
- data/lib/cassandra/compression/compressors/lz4.rb +1 -1
- data/lib/cassandra/compression/compressors/snappy.rb +1 -1
- data/lib/cassandra/custom_data.rb +1 -1
- data/lib/cassandra/driver.rb +1 -1
- data/lib/cassandra/duration.rb +100 -0
- data/lib/cassandra/errors.rb +1 -1
- data/lib/cassandra/execution/info.rb +1 -1
- data/lib/cassandra/execution/options.rb +1 -1
- data/lib/cassandra/execution/profile.rb +5 -2
- data/lib/cassandra/execution/profile_manager.rb +1 -1
- data/lib/cassandra/execution/trace.rb +1 -1
- data/lib/cassandra/executors.rb +1 -1
- data/lib/cassandra/function.rb +1 -1
- data/lib/cassandra/function_collection.rb +1 -1
- data/lib/cassandra/future.rb +9 -3
- data/lib/cassandra/host.rb +1 -1
- data/lib/cassandra/index.rb +1 -1
- data/lib/cassandra/keyspace.rb +1 -1
- data/lib/cassandra/listener.rb +1 -1
- data/lib/cassandra/load_balancing.rb +1 -1
- data/lib/cassandra/load_balancing/policies.rb +1 -1
- data/lib/cassandra/load_balancing/policies/dc_aware_round_robin.rb +1 -1
- data/lib/cassandra/load_balancing/policies/round_robin.rb +1 -1
- data/lib/cassandra/load_balancing/policies/token_aware.rb +1 -1
- data/lib/cassandra/load_balancing/policies/white_list.rb +1 -1
- data/lib/cassandra/materialized_view.rb +1 -1
- data/lib/cassandra/null_logger.rb +1 -1
- data/lib/cassandra/protocol.rb +1 -1
- data/lib/cassandra/protocol/coder.rb +1 -1
- data/lib/cassandra/protocol/cql_byte_buffer.rb +63 -15
- data/lib/cassandra/protocol/cql_protocol_handler.rb +58 -10
- data/lib/cassandra/protocol/request.rb +1 -1
- data/lib/cassandra/protocol/requests/auth_response_request.rb +1 -1
- data/lib/cassandra/protocol/requests/batch_request.rb +1 -1
- data/lib/cassandra/protocol/requests/credentials_request.rb +1 -1
- data/lib/cassandra/protocol/requests/execute_request.rb +1 -1
- data/lib/cassandra/protocol/requests/options_request.rb +1 -1
- data/lib/cassandra/protocol/requests/prepare_request.rb +1 -1
- data/lib/cassandra/protocol/requests/query_request.rb +1 -1
- data/lib/cassandra/protocol/requests/register_request.rb +1 -1
- data/lib/cassandra/protocol/requests/startup_request.rb +1 -1
- data/lib/cassandra/protocol/requests/void_query_request.rb +1 -1
- data/lib/cassandra/protocol/response.rb +1 -1
- data/lib/cassandra/protocol/responses/already_exists_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/auth_challenge_response.rb +1 -1
- data/lib/cassandra/protocol/responses/auth_success_response.rb +1 -1
- data/lib/cassandra/protocol/responses/authenticate_response.rb +1 -1
- data/lib/cassandra/protocol/responses/error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/event_response.rb +1 -1
- data/lib/cassandra/protocol/responses/function_failure_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/prepared_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/raw_rows_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/read_failure_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/read_timeout_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/ready_response.rb +1 -1
- data/lib/cassandra/protocol/responses/result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/rows_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/schema_change_event_response.rb +1 -1
- data/lib/cassandra/protocol/responses/schema_change_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/set_keyspace_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/status_change_event_response.rb +1 -1
- data/lib/cassandra/protocol/responses/supported_response.rb +1 -1
- data/lib/cassandra/protocol/responses/topology_change_event_response.rb +1 -1
- data/lib/cassandra/protocol/responses/unavailable_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/unprepared_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/void_result_response.rb +1 -1
- data/lib/cassandra/protocol/responses/write_failure_error_response.rb +1 -1
- data/lib/cassandra/protocol/responses/write_timeout_error_response.rb +1 -1
- data/lib/cassandra/protocol/v1.rb +1 -1
- data/lib/cassandra/protocol/v3.rb +1 -1
- data/lib/cassandra/protocol/v4.rb +4 -1
- data/lib/cassandra/reconnection.rb +1 -1
- data/lib/cassandra/reconnection/policies.rb +1 -1
- data/lib/cassandra/reconnection/policies/constant.rb +1 -1
- data/lib/cassandra/reconnection/policies/exponential.rb +1 -1
- data/lib/cassandra/result.rb +1 -1
- data/lib/cassandra/retry.rb +1 -1
- data/lib/cassandra/retry/policies.rb +1 -1
- data/lib/cassandra/retry/policies/default.rb +1 -1
- data/lib/cassandra/retry/policies/downgrading_consistency.rb +1 -1
- data/lib/cassandra/retry/policies/fallthrough.rb +1 -1
- data/lib/cassandra/session.rb +8 -4
- data/lib/cassandra/statement.rb +1 -1
- data/lib/cassandra/statements.rb +1 -1
- data/lib/cassandra/statements/batch.rb +1 -1
- data/lib/cassandra/statements/bound.rb +1 -1
- data/lib/cassandra/statements/prepared.rb +1 -1
- data/lib/cassandra/statements/simple.rb +1 -1
- data/lib/cassandra/statements/void.rb +1 -1
- data/lib/cassandra/table.rb +2 -2
- data/lib/cassandra/time.rb +1 -1
- data/lib/cassandra/time_uuid.rb +1 -1
- data/lib/cassandra/timestamp_generator.rb +1 -1
- data/lib/cassandra/timestamp_generator/simple.rb +1 -1
- data/lib/cassandra/timestamp_generator/ticking_on_duplicate.rb +1 -1
- data/lib/cassandra/trigger.rb +1 -1
- data/lib/cassandra/tuple.rb +1 -1
- data/lib/cassandra/types.rb +73 -2
- data/lib/cassandra/udt.rb +1 -1
- data/lib/cassandra/util.rb +21 -1
- data/lib/cassandra/uuid.rb +1 -1
- data/lib/cassandra/uuid/generator.rb +1 -1
- data/lib/cassandra/version.rb +2 -2
- data/lib/cassandra_murmur3.jar +0 -0
- data/lib/datastax/cassandra.rb +1 -1
- metadata +8 -8
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright
|
4
|
+
# Copyright DataStax, Inc.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -61,6 +61,9 @@ module Cassandra
|
|
61
61
|
|
62
62
|
class Decoder
|
63
63
|
def initialize(handler, compressor = nil, custom_type_handlers = {})
|
64
|
+
# In v4 the duration type is represented as a custom type so we always want to have
|
65
|
+
# a handler included here. This handler can be overridden via the connection options.
|
66
|
+
custom_type_handlers[Cassandra::Types::Duration.type] ||= Cassandra::Types::Duration
|
64
67
|
@handler = handler
|
65
68
|
@compressor = compressor
|
66
69
|
@state = :initial
|
data/lib/cassandra/result.rb
CHANGED
data/lib/cassandra/retry.rb
CHANGED
data/lib/cassandra/session.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright
|
4
|
+
# Copyright DataStax, Inc.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -45,13 +45,17 @@ module Cassandra
|
|
45
45
|
# @param options [Hash] (nil) a customizable set of options
|
46
46
|
#
|
47
47
|
# @option options [Symbol] :consistency consistency level for the request.
|
48
|
-
# Must be one of {Cassandra::CONSISTENCIES}
|
48
|
+
# Must be one of {Cassandra::CONSISTENCIES}. Defaults to the setting in the
|
49
|
+
# active execution profile. If none is specified, the default profile is used,
|
50
|
+
# which is set to `:local_one`.
|
49
51
|
# @option options [Integer] :page_size size of results page. You can page
|
50
52
|
# through results using {Cassandra::Result#next_page} or
|
51
53
|
# {Cassandra::Result#next_page_async}
|
52
54
|
# @option options [Boolean] :trace (false) whether to enable request tracing
|
53
55
|
# @option options [Numeric] :timeout (nil) if specified, it is a number of
|
54
|
-
# seconds after which to time out the request if it hasn't completed
|
56
|
+
# seconds after which to time out the request if it hasn't completed. Defaults to the setting in the
|
57
|
+
# active execution profile. If none is specified, the default profile is used,
|
58
|
+
# which is set to 12 seconds.
|
55
59
|
# @option options [Symbol] :serial_consistency (nil) this option is only
|
56
60
|
# relevant for conditional updates and specifies a serial consistency to
|
57
61
|
# be used, one of {Cassandra::SERIAL_CONSISTENCIES}
|
@@ -243,7 +247,7 @@ module Cassandra
|
|
243
247
|
# @private
|
244
248
|
def merge_execution_options(options)
|
245
249
|
if options
|
246
|
-
Util.assert_instance_of(::Hash, options
|
250
|
+
Util.assert_instance_of(::Hash, options)
|
247
251
|
# Yell if the caller gave us a bad profile name.
|
248
252
|
execution_profile = nil
|
249
253
|
if options.key?(:execution_profile)
|
data/lib/cassandra/statement.rb
CHANGED
data/lib/cassandra/statements.rb
CHANGED