datastax_rails 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -28,25 +28,29 @@ First add it to your Gemfile:
28
28
 
29
29
  Configure the config/datastax.yml file:
30
30
 
31
- development:
32
- servers: ["localhost:9160"]
33
- keyspace: "<my_app>_development"
34
- strategy_class: "org.apache.cassandra.locator.NetworkTopologyStrategy"
35
- strategy_options: {"DC1": "1"}
36
- solr:
37
- url: http://localhost:8983/solr
31
+ development:
32
+ servers: ["localhost:9160"]
33
+ keyspace: "<my_app>_development"
34
+ strategy_class: "org.apache.cassandra.locator.NetworkTopologyStrategy"
35
+ strategy_options: {"DC1": "1"}
36
+ connection_options:
37
+ timeout: 2
38
+ solr:
39
+ url: http://localhost:8983/solr
38
40
 
39
41
  The above is configured to use NetworkTopologyStrategy. If you go with this, you'll need to configure Datastax to use the
40
42
  NetworkTopologySnitch and set up the cassandra-topology.properties file. See the Datastax documentation for more information.
41
43
  For a more simple, single datacenter setup, something like this should probably work:
42
44
 
43
- development:
44
- servers: ["localhost:9160"]
45
- keyspace: "<my_app>_development"
46
- strategy_class: "org.apache.cassandra.locator.SimpleStrategy"
47
- strategy_options: {"replication_factor": "1"}
48
- solr:
49
- url: http://localhost:8983/solr
45
+ development:
46
+ servers: ["localhost:9160"]
47
+ keyspace: "<my_app>_development"
48
+ strategy_class: "org.apache.cassandra.locator.SimpleStrategy"
49
+ strategy_options: {"replication_factor": "1"}
50
+ connection_options:
51
+ timeout: 2
52
+ solr:
53
+ url: http://localhost:8983/solr
50
54
 
51
55
  Create your keyspace:
52
56
 
@@ -60,3 +64,8 @@ Once you've created some models, the following will upload the solr schemas and
60
64
 
61
65
  It is safe to run ds:schema over and over. In fact, it is necessary to re-run it any time you change the
62
66
  attributes on any model. DSR will only upload schema files if they have changed.
67
+
68
+ === Known issues
69
+
70
+ Calling :find on a model with a bogus ID returns an empty model instead of RecordNotFound. This is due to a bug
71
+ in DSE that is supposedly fixed in the upcoming 2.2 release.
@@ -414,7 +414,7 @@ module DatastaxRails #:nodoc:
414
414
 
415
415
  class << self
416
416
  delegate :find, :first, :all, :exists?, :any?, :many?, :to => :scoped
417
- delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, :to => :scoped
417
+ delegate :destroy, :destroy_all, :delete, :update, :update_all, :to => :scoped
418
418
  # delegate :find_each, :find_in_batches, :to => :scoped
419
419
  delegate :order, :limit, :where, :where_not, :page, :paginate, :select, :to => :scoped
420
420
  delegate :per_page, :each, :group, :total_pages, :search, :fulltext, :to => :scoped
@@ -22,11 +22,11 @@ module DatastaxRails
22
22
  end
23
23
 
24
24
  private
25
- def create_or_update #:nodoc:
25
+ def create_or_update(*) #:nodoc:
26
26
  _run_save_callbacks { super }
27
27
  end
28
28
 
29
- def create #:nodoc:
29
+ def create(*) #:nodoc:
30
30
  _run_create_callbacks { super }
31
31
  end
32
32
 
@@ -14,7 +14,8 @@ module DatastaxRails
14
14
  def establish_connection(spec)
15
15
  DatastaxRails::Base.config = spec.with_indifferent_access
16
16
  spec.reverse_merge!(DEFAULT_OPTIONS)
17
- self.connection = CassandraCQL::Database.new(spec[:servers], :keyspace => spec[:keyspace])
17
+ connection_options = spec[:connection_options] || {}
18
+ self.connection = CassandraCQL::Database.new(spec[:servers], {:keyspace => spec[:keyspace]}, connection_options.symbolize_keys)
18
19
  end
19
20
  end
20
21
  end
@@ -2,25 +2,32 @@ module DatastaxRails
2
2
  module Persistence
3
3
  extend ActiveSupport::Concern
4
4
 
5
+ included do
6
+ attr_accessor :ds_consistency_level
7
+ end
8
+
5
9
  module ClassMethods
10
+ # Removes one or more records with corresponding keys
6
11
  def remove(*keys)
7
12
  ActiveSupport::Notifications.instrument("remove.datastax_rails", :column_family => column_family, :key => key) do
8
13
  cql.delete(keys).using(thrift_write_consistency).execute
9
14
  end
10
15
  end
11
16
 
17
+ # Truncates the column_family associated with this class
12
18
  def delete_all
13
19
  ActiveSupport::Notifications.instrument("truncate.datastax_rails", :column_family => column_family) do
14
20
  cql.truncate.execute
15
21
  end
16
22
  end
23
+ alias :truncate :delete_all
17
24
 
18
- def create(attributes = {})
19
- new(attributes).tap do |object|
20
- object.save
25
+ def create(attributes = {}, options = {}, &block)
26
+ new(attributes, &block).tap do |object|
27
+ object.save(options)
21
28
  end
22
29
  end
23
-
30
+
24
31
  def write(key, attributes, schema_version)
25
32
  key.tap do |key|
26
33
  attributes = encode_attributes(attributes, schema_version)
@@ -70,16 +77,16 @@ module DatastaxRails
70
77
  !(new_record? || destroyed?)
71
78
  end
72
79
 
73
- def save(*)
80
+ def save(options = {})
74
81
  begin
75
- create_or_update
82
+ create_or_update(options)
76
83
  rescue DatastaxRails::RecordInvalid
77
84
  false
78
85
  end
79
86
  end
80
87
 
81
- def save!
82
- create_or_update || raise(RecordNotSaved)
88
+ def save!(options = {})
89
+ create_or_update(options) || raise(RecordNotSaved)
83
90
  end
84
91
 
85
92
  def destroy
@@ -88,20 +95,20 @@ module DatastaxRails
88
95
  freeze
89
96
  end
90
97
 
91
- def update_attribute(name, value)
98
+ def update_attribute(name, value, options = {})
92
99
  name = name.to_s
93
100
  send("#{name}=", value)
94
- save(:validate => false)
101
+ save(options.merge(:validate => false))
95
102
  end
96
103
 
97
- def update_attributes(attributes)
104
+ def update_attributes(attributes, options = {})
98
105
  self.attributes = attributes
99
- save
106
+ save(options)
100
107
  end
101
108
 
102
- def update_attributes!(attributes)
109
+ def update_attributes!(attributes, options = {})
103
110
  self.attributes = attributes
104
- save!
111
+ save!(options)
105
112
  end
106
113
 
107
114
  def reload
@@ -109,23 +116,23 @@ module DatastaxRails
109
116
  end
110
117
 
111
118
  private
112
- def create_or_update
113
- result = new_record? ? create : update
119
+ def create_or_update(options)
120
+ result = new_record? ? create(options) : update(options)
114
121
  result != false
115
122
  end
116
123
 
117
- def create
124
+ def create(options)
118
125
  @key ||= self.class.next_key(self)
119
- write
126
+ write(options)
120
127
  @new_record = false
121
128
  @key
122
129
  end
123
130
 
124
- def update
125
- write
131
+ def update(options)
132
+ write(options)
126
133
  end
127
134
 
128
- def write #:nodoc:
135
+ def write(options) #:nodoc:
129
136
  changed_attributes = changed.inject({}) { |h, n| h[n] = read_attribute(n); h }
130
137
  self.class.write(key, changed_attributes, schema_version)
131
138
  end
@@ -277,7 +277,7 @@ module DatastaxRails
277
277
  def fulltext(query, opts = {})
278
278
  return self if query.blank?
279
279
 
280
- opts[:query] = query
280
+ opts[:query] = downcase_query(query)
281
281
 
282
282
  clone.tap do |r|
283
283
  r.fulltext_values << opts
@@ -297,13 +297,15 @@ module DatastaxRails
297
297
  def solr_format(value)
298
298
  case
299
299
  when value.is_a?(Date), value.is_a?(Time)
300
- value.strftime('%Y-%m-%dT%H\:%M\:%SZ')
300
+ value.strftime('%Y-%m-%dT%H:%M:%SZ')
301
301
  when value.is_a?(Array)
302
302
  value.collect {|v| v.gsub(/ /,"\\ ") }.join(" OR ")
303
303
  when value.is_a?(Fixnum)
304
304
  value < 0 ? "\\#{value}" : value
305
+ when value.is_a?(Range)
306
+ "[#{solr_format(value.first)} TO #{solr_format(value.last)}]"
305
307
  when value.is_a?(String)
306
- value.gsub(/ /,"\\ ")
308
+ solr_escape(downcase_query(value.gsub(/ /,"\\ ")))
307
309
  else
308
310
  value
309
311
  end
@@ -261,26 +261,26 @@ module DatastaxRails
261
261
  @where_values.each do |wv|
262
262
  wv.each do |k,v|
263
263
  # If v is blank, check that there is no value for the field in the document
264
- filter_queries << (v.blank? ? "-#{k}:[* TO *]" : "#{k}:(#{solr_escape(v)})")
264
+ filter_queries << (v.blank? ? "-#{k}:[* TO *]" : "#{k}:(#{v})")
265
265
  end
266
266
  end
267
267
 
268
268
  @where_not_values.each do |wnv|
269
269
  wnv.each do |k,v|
270
270
  # If v is blank, check for any value for the field in document
271
- filter_queries << (v.blank? ? "#{k}:[* TO *]" : "-#{k}:(#{solr_escape(v)})")
271
+ filter_queries << (v.blank? ? "#{k}:[* TO *]" : "-#{k}:(#{v})")
272
272
  end
273
273
  end
274
274
 
275
275
  @greater_than_values.each do |gtv|
276
276
  gtv.each do |k,v|
277
- filter_queries << "#{k}:[#{solr_escape(v)} TO *]"
277
+ filter_queries << "#{k}:[#{v} TO *]"
278
278
  end
279
279
  end
280
280
 
281
281
  @less_than_values.each do |ltv|
282
282
  ltv.each do |k,v|
283
- filter_queries << "#{k}:[* TO #{solr_escape(v)}]"
283
+ filter_queries << "#{k}:[* TO #{v}]"
284
284
  end
285
285
  end
286
286
 
@@ -360,7 +360,7 @@ module DatastaxRails
360
360
  # then analysis isn't performed. This means that the query does not get downcased.
361
361
  # We therefore need to perform the downcasing ourselves. This does it while still
362
362
  # leaving boolean operations (AND, OR, NOT) upcased.
363
- def self.downcase_query(value)
363
+ def downcase_query(value)
364
364
  if(value.is_a?(String))
365
365
  value.split(/\bAND\b/).collect do |a|
366
366
  a.split(/\bOR\b/).collect do |o|
@@ -77,7 +77,9 @@ module DatastaxRails
77
77
  return ERB.new(File.read(File.join(File.dirname(__FILE__),"..","..","..","config","schema.xml.erb"))).result(binding)
78
78
  end
79
79
 
80
- def upload_solr_schemas(column_family = :all)
80
+ def upload_solr_schemas(column_family)
81
+ force = !column_family.nil?
82
+ column_family ||= :all
81
83
  # Ensure schema migrations CF exists
82
84
  unless connection.schema.column_families['schema_migrations']
83
85
  connection.execute_cql_query(DatastaxRails::Cql::CreateColumnFamily.new('schema_migrations').key_type(:text).to_cql)
@@ -90,7 +92,7 @@ module DatastaxRails
90
92
 
91
93
  models_to_upload = []
92
94
 
93
- if column_family == :all
95
+ if column_family.to_sym == :all
94
96
  # Ensure all models are loaded
95
97
  Dir[Rails.root.join("app","models",'*.rb').to_s].each do |file|
96
98
  require File.basename(file, File.extname(file))
@@ -113,23 +115,22 @@ module DatastaxRails
113
115
  solr_url = "#{DatastaxRails::Base.config[:solr][:url]}/resource/#{DatastaxRails::Base.config[:keyspace]}.#{model.column_family}"
114
116
  uri = URI.parse(solr_url)
115
117
  Net::HTTP.start(uri.host, uri.port) do |http|
116
- if solrconfig_digest != sm_digests['solrconfig']
118
+ if force || solrconfig_digest != sm_digests['solrconfig']
117
119
  puts "Posting Solr Config file to '#{uri.path}/solrconfig.xml'"
118
120
  http.post(uri.path+"/solrconfig.xml", solrconfig)
119
121
  DatastaxRails::Cql::Update.new(SchemaMigration, model.column_family).columns(:solrconfig => solrconfig_digest).execute
120
122
  end
121
- if stopwords_digest != sm_digests['stopwords']
123
+ if force || stopwords_digest != sm_digests['stopwords']
122
124
  puts "Posting Solr Stopwords file to '#{uri.path}/stopwords.txt'"
123
125
  http.post(uri.path+"/stopwords.txt", stopwords)
124
126
  DatastaxRails::Cql::Update.new(SchemaMigration, model.column_family).columns(:stopwords => stopwords_digest).execute
125
127
  end
126
- if schema_digest != sm_digests['digest']
128
+ if force || schema_digest != sm_digests['digest']
127
129
  puts "Posting Solr Schema file to '#{uri.path}/schema.xml'"
128
130
  http.post(uri.path+"/schema.xml", schema)
129
131
  DatastaxRails::Cql::Update.new(SchemaMigration, model.column_family).columns(:digest => schema_digest).execute
130
132
  end
131
133
  end
132
-
133
134
  end
134
135
  end
135
136
 
@@ -4,7 +4,7 @@ namespace :ds do
4
4
  @config = @configs[Rails.env || 'development']
5
5
  end
6
6
 
7
- desc 'Create the keyspace in config/cassandra.yml for the current environment'
7
+ desc 'Create the keyspace in config/datastax.yml for the current environment'
8
8
  task :create do
9
9
  @configs = YAML.load_file(Rails.root.join("config", "datastax.yml"))
10
10
  @config = @configs[Rails.env || 'development']
@@ -13,7 +13,7 @@ namespace :ds do
13
13
  end
14
14
 
15
15
  namespace :create do
16
- desc 'Create keyspaces in config/cassandra.yml for all environments'
16
+ desc 'Create keyspaces in config/datastax.yml for all environments'
17
17
  task :all => :configure do
18
18
  created = []
19
19
  @configs.values.each do |config|
@@ -24,14 +24,14 @@ namespace :ds do
24
24
  end
25
25
  end
26
26
 
27
- desc 'Drop keyspace in config/cassandra.yml for the current environment'
27
+ desc 'Drop keyspace in config/datastax.yml for the current environment'
28
28
  task :drop => :configure do
29
29
  DatastaxRails::Tasks::Keyspace.drop @config['keyspace']
30
30
  puts "Dropped keyspace: #{@config['keyspace']}"
31
31
  end
32
32
 
33
33
  namespace :drop do
34
- desc 'Drop keyspaces in config/cassandra.yml for all environments'
34
+ desc 'Drop keyspaces in config/datastax.yml for all environments'
35
35
  task :all => :configure do
36
36
  dropped = []
37
37
  @configs.values.each do |config|
@@ -42,19 +42,13 @@ namespace :ds do
42
42
  end
43
43
  end
44
44
 
45
- task :schema => :configure do
45
+ desc 'Upload SOLR schemas -- pass in CF name to force an upload (all uploads everything).'
46
+ task :schema, [:force_cf] => :configure do |t, args|
46
47
  cf = DatastaxRails::Tasks::ColumnFamily.new(@config['keyspace'])
47
- cf.upload_solr_schemas
48
+ cf.upload_solr_schemas(args[:force_cf])
48
49
  end
49
50
 
50
- desc 'Migrate the keyspace (options: VERSION=x)'
51
- task :migrate => :configure do
52
- version = ( ENV['VERSION'] ? ENV['VERSION'].to_i : nil )
53
- DatastaxRails::Schema::Migrator.migrate DatastaxRails::Schema::Migrator.migrations_path, version
54
- schema_dump
55
- end
56
-
57
- desc 'Load the seed data from ks/seeds.rb'
51
+ desc 'Load the seed data from ds/seeds.rb'
58
52
  task :seed => :environment do
59
53
  seed_file = Rails.root.join("ks","seeds.rb")
60
54
  load(seed_file) if seed_file.exist?
@@ -1,3 +1,3 @@
1
1
  module DatastaxRails
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -94,6 +94,13 @@ describe DatastaxRails::Relation do
94
94
  @relation.commit_solr
95
95
  @relation.where(:name => ['horseback riding', 'some other hobby']).should_not be_empty
96
96
  end
97
+
98
+ it "should search for values within a range" do
99
+ Hobby.create(:name => 'jobbing', :complexity => 1.2)
100
+ @relation.commit_solr
101
+ @relation.where(:complexity => 1..2).should_not be_empty
102
+ @relation.where(:complexity => 2..3).should be_empty
103
+ end
97
104
  end
98
105
 
99
106
  describe "#where_not" do
@@ -112,6 +119,10 @@ describe DatastaxRails::Relation do
112
119
  end
113
120
 
114
121
  describe "#fulltext" do
115
-
122
+ it "should allow case-insensitive wildcard searches" do
123
+ Hobby.create(:name => "Swimming")
124
+ @relation.commit_solr
125
+ @relation.fulltext("swimming").should_not be_empty
126
+ end
116
127
  end
117
128
  end
@@ -296,3 +296,98 @@ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
296
296
  SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
297
297
  SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
298
298
  SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
299
+ TRUNCATE hobbies
300
+ hobbies truncate (1006.5ms) hobbies
301
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
302
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
303
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
304
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
305
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
306
+ update people using consistency QUORUM SET nickname = 'Frank' , updated_at = '2012-07-25T13:44:02Z' , schema_version = '0' WHERE KEY IN ('7c572fcc-bbeb-11e1-915e-ca3273ab35b9')
307
+ people insert (4.2ms) 7c572fcc-bbeb-11e1-915e-ca3273ab35b9 {"updated_at"=>"2012-07-25T13:44:02Z", "nickname"=>"Frank", "schema_version"=>"0"}
308
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
309
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
310
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
311
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
312
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
313
+ update schema_migrations using consistency QUORUM SET digest = '4dfb82012726f11f7a92bf1140b8694f70f4534b' WHERE KEY IN ('hobbies')
314
+ update hobbies using consistency QUORUM SET name = 'Swimming' , created_at = '2012-07-25T14:32:26Z' , updated_at = '2012-07-25T14:32:26Z' , schema_version = '0' WHERE KEY IN ('8e10a45c-d665-11e1-8431-1cdaf435f81b')
315
+ hobbies insert (4.2ms) 8e10a45c-d665-11e1-8431-1cdaf435f81b {"name"=>"Swimming", "created_at"=>"2012-07-25T14:32:26Z", "updated_at"=>"2012-07-25T14:32:26Z", "schema_version"=>"0"}
316
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
317
+ update schema_migrations using consistency QUORUM SET digest = '4fe800b7b84bd0b91df4ee6fd4ccef51ce4fbdc8' WHERE KEY IN ('people')
318
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
319
+ update schema_migrations using consistency QUORUM SET digest = '96576c08f1dc61a956f4561906258c0a0dbe9673' WHERE KEY IN ('cars')
320
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
321
+ update schema_migrations using consistency QUORUM SET digest = 'f2ed01083dec2d627152b04cddd1e179b9075981' WHERE KEY IN ('jobs')
322
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
323
+ update schema_migrations using consistency QUORUM SET digest = '460ce3b1231945a4eb5c508cfac911d71f57d7a9' WHERE KEY IN ('boats')
324
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
325
+ update schema_migrations using consistency QUORUM SET digest = '12a4309ee59ebbec92d77f8293fcf1059af271c5' WHERE KEY IN ('hobbies')
326
+ update hobbies using consistency QUORUM SET name = 'Swimming' , created_at = '2012-07-25T16:53:49Z' , updated_at = '2012-07-25T16:53:49Z' , schema_version = '0' WHERE KEY IN ('4eac7fe8-d679-11e1-9064-e7bcad210add')
327
+ hobbies insert (12.2ms) 4eac7fe8-d679-11e1-9064-e7bcad210add {"name"=>"Swimming", "created_at"=>"2012-07-25T16:53:49Z", "updated_at"=>"2012-07-25T16:53:49Z", "schema_version"=>"0"}
328
+ update people using consistency QUORUM SET name = 'Steve' , created_at = '2012-07-25T16:58:10Z' , nickname = 'Dog' , updated_at = '2012-07-25T16:58:10Z' , schema_version = '0' WHERE KEY IN ('ea5d4cec-d679-11e1-90fc-d988657988ea')
329
+ people insert (3.3ms) ea5d4cec-d679-11e1-90fc-d988657988ea {"name"=>"Steve", "created_at"=>"2012-07-25T16:58:10Z", "updated_at"=>"2012-07-25T16:58:10Z", "nickname"=>"Dog", "schema_version"=>"0"}
330
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
331
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
332
+ update schema_migrations using consistency QUORUM SET digest = '666e0279b6183050f309749cd8fe0e38b6d82b61' WHERE KEY IN ('people')
333
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
334
+ update schema_migrations using consistency QUORUM SET digest = '8619c47fab2965bc608bb9d3d4f2655a140c0d5d' WHERE KEY IN ('cars')
335
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
336
+ update schema_migrations using consistency QUORUM SET digest = '9777c0692dbdd644fb8079c2150cbcd4d391f25e' WHERE KEY IN ('jobs')
337
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
338
+ update schema_migrations using consistency QUORUM SET digest = '03a6047584d53e522041515b7c34ef6e227625da' WHERE KEY IN ('boats')
339
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
340
+ update schema_migrations using consistency QUORUM SET digest = '4dfb82012726f11f7a92bf1140b8694f70f4534b' WHERE KEY IN ('hobbies')
341
+ update people using consistency QUORUM SET name = 'James' , created_at = '2012-07-25T18:41:32Z' , nickname = 'Jim' , updated_at = '2012-07-25T18:41:32Z' , schema_version = '0' WHERE KEY IN ('5affdbaa-d688-11e1-81c2-85b55974dfa6')
342
+ people insert (5.7ms) 5affdbaa-d688-11e1-81c2-85b55974dfa6 {"name"=>"James", "created_at"=>"2012-07-25T18:41:32Z", "updated_at"=>"2012-07-25T18:41:32Z", "nickname"=>"Jim", "schema_version"=>"0"}
343
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
344
+ update schema_migrations using consistency QUORUM SET digest = 'd5d2d3dfc09623df745d2c4dbbecfdf28bb4ea54' WHERE KEY IN ('people')
345
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
346
+ update schema_migrations using consistency QUORUM SET digest = 'c83a31e72b8fa195c9e6a71d525a294990baf9b5' WHERE KEY IN ('cars')
347
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
348
+ update schema_migrations using consistency QUORUM SET digest = '01481ebbdd1fd1aa83f5fa175831b5859a09e2f6' WHERE KEY IN ('jobs')
349
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
350
+ update schema_migrations using consistency QUORUM SET digest = '4e7a6d352ae0c202107288be18b40c17608435b5' WHERE KEY IN ('boats')
351
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
352
+ update schema_migrations using consistency QUORUM SET digest = '0dd6ac4b4bfab2d16d88d16d4b49240b398b0665' WHERE KEY IN ('hobbies')
353
+ update people using consistency QUORUM SET name = 'Roosevelt' , created_at = '2012-07-25T19:08:24Z' , nickname = 'Rose' , updated_at = '2012-07-25T19:08:24Z' , schema_version = '0' WHERE KEY IN ('1bb7274c-d68c-11e1-80d1-d8ed5f7e57ea')
354
+ people insert (4.3ms) 1bb7274c-d68c-11e1-80d1-d8ed5f7e57ea {"name"=>"Roosevelt", "created_at"=>"2012-07-25T19:08:24Z", "updated_at"=>"2012-07-25T19:08:24Z", "nickname"=>"Rose", "schema_version"=>"0"}
355
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
356
+ update schema_migrations using consistency QUORUM SET digest = '666e0279b6183050f309749cd8fe0e38b6d82b61' WHERE KEY IN ('people')
357
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
358
+ update schema_migrations using consistency QUORUM SET digest = '8619c47fab2965bc608bb9d3d4f2655a140c0d5d' WHERE KEY IN ('cars')
359
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
360
+ update schema_migrations using consistency QUORUM SET digest = '9777c0692dbdd644fb8079c2150cbcd4d391f25e' WHERE KEY IN ('jobs')
361
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
362
+ update schema_migrations using consistency QUORUM SET digest = '03a6047584d53e522041515b7c34ef6e227625da' WHERE KEY IN ('boats')
363
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
364
+ update schema_migrations using consistency QUORUM SET digest = '125644e38ff34a0c370d7d73610e20d7814de405' WHERE KEY IN ('hobbies')
365
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
366
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
367
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
368
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
369
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
370
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
371
+ update schema_migrations using consistency QUORUM SET solrconfig = 'f62b77622d5d27f14d3a5fba40a5b07713b76edc' WHERE KEY IN ('hobbies')
372
+ update schema_migrations using consistency QUORUM SET stopwords = 'ec75bf81ff3d3196ff4667d16f3ba46fc1b4ac76' WHERE KEY IN ('hobbies')
373
+ update schema_migrations using consistency QUORUM SET digest = '125644e38ff34a0c370d7d73610e20d7814de405' WHERE KEY IN ('hobbies')
374
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'people'
375
+ update schema_migrations using consistency QUORUM SET solrconfig = 'f62b77622d5d27f14d3a5fba40a5b07713b76edc' WHERE KEY IN ('people')
376
+ update schema_migrations using consistency QUORUM SET stopwords = 'ec75bf81ff3d3196ff4667d16f3ba46fc1b4ac76' WHERE KEY IN ('people')
377
+ update schema_migrations using consistency QUORUM SET digest = '666e0279b6183050f309749cd8fe0e38b6d82b61' WHERE KEY IN ('people')
378
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'cars'
379
+ update schema_migrations using consistency QUORUM SET solrconfig = 'f62b77622d5d27f14d3a5fba40a5b07713b76edc' WHERE KEY IN ('cars')
380
+ update schema_migrations using consistency QUORUM SET stopwords = 'ec75bf81ff3d3196ff4667d16f3ba46fc1b4ac76' WHERE KEY IN ('cars')
381
+ update schema_migrations using consistency QUORUM SET digest = '8619c47fab2965bc608bb9d3d4f2655a140c0d5d' WHERE KEY IN ('cars')
382
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'jobs'
383
+ update schema_migrations using consistency QUORUM SET solrconfig = 'f62b77622d5d27f14d3a5fba40a5b07713b76edc' WHERE KEY IN ('jobs')
384
+ update schema_migrations using consistency QUORUM SET stopwords = 'ec75bf81ff3d3196ff4667d16f3ba46fc1b4ac76' WHERE KEY IN ('jobs')
385
+ update schema_migrations using consistency QUORUM SET digest = '9777c0692dbdd644fb8079c2150cbcd4d391f25e' WHERE KEY IN ('jobs')
386
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'boats'
387
+ update schema_migrations using consistency QUORUM SET solrconfig = 'f62b77622d5d27f14d3a5fba40a5b07713b76edc' WHERE KEY IN ('boats')
388
+ update schema_migrations using consistency QUORUM SET stopwords = 'ec75bf81ff3d3196ff4667d16f3ba46fc1b4ac76' WHERE KEY IN ('boats')
389
+ update schema_migrations using consistency QUORUM SET digest = '03a6047584d53e522041515b7c34ef6e227625da' WHERE KEY IN ('boats')
390
+ SELECT * FROM schema_migrations USING CONSISTENCY QUORUM WHERE key = 'hobbies'
391
+ update schema_migrations using consistency QUORUM SET solrconfig = 'f62b77622d5d27f14d3a5fba40a5b07713b76edc' WHERE KEY IN ('hobbies')
392
+ update schema_migrations using consistency QUORUM SET stopwords = 'ec75bf81ff3d3196ff4667d16f3ba46fc1b4ac76' WHERE KEY IN ('hobbies')
393
+ update schema_migrations using consistency QUORUM SET digest = '125644e38ff34a0c370d7d73610e20d7814de405' WHERE KEY IN ('hobbies')