tsukasaoishi-miyazakiresistance 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -13,10 +13,10 @@ MiyazakiResistance is a library like ActiveRecord to use Tokyo Tyrant.
13
13
  set_server "localhost", 1975, :write
14
14
  set_server "slave", 1975, :standby
15
15
  set_timeout 60
16
- set_column :name, :string, :index
16
+ set_column :name, :string
17
17
  set_column :age, :integer
18
18
  set_column :birthday, :date
19
- set_column :created_at, :datetime, :index
19
+ set_column :created_at, :datetime
20
20
  end
21
21
 
22
22
  work = Example.new
@@ -38,8 +38,6 @@ module MiyazakiResistance
38
38
  name = name.to_s
39
39
  self.__send__(:attr_accessor, name)
40
40
  self.all_columns.update(name => type)
41
-
42
- set_index(name, type) if index == :index
43
41
  end
44
42
 
45
43
  def read_connection
@@ -96,26 +94,6 @@ module MiyazakiResistance
96
94
  self.connection_pool[:write] = self.connection_pool[:standby]
97
95
  self.connection_pool[:standby] = nil
98
96
  end
99
-
100
- def set_index(name, type)
101
- index_type = case type
102
- when :integer, :datetime, :date
103
- TokyoTyrant::RDBTBL::ITDECIMAL
104
- when :string
105
- TokyoTyrant::RDBTBL::ITLEXICAL
106
- end
107
-
108
- self.all_indexes << name
109
- all_connections.each do |con|
110
- begin
111
- con.setindex(name, index_type)
112
- con.setindex(name, TokyoTyrant::RDBTBL::ITOPT)
113
- rescue TimeoutError
114
- remove_pool(con)
115
- retry
116
- end
117
- end
118
- end
119
97
  end
120
98
 
121
99
  module InstanceMethods
@@ -13,7 +13,7 @@ require 'miyazaki_resistance/base'
13
13
  require 'miyazaki_resistance/error'
14
14
 
15
15
  module MiyazakiResistance
16
- VERSION = '0.0.8'
16
+ VERSION = '0.0.9'
17
17
  end
18
18
 
19
19
  MiyazakiResistance::Base.class_eval do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tsukasaoishi-miyazakiresistance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsukasa OISHI
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-08 00:00:00 -07:00
12
+ date: 2009-04-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency