slillibri-cassandra 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +12 -0
- data/LICENSE +202 -0
- data/Manifest +25 -0
- data/README +65 -0
- data/Rakefile +13 -0
- data/cassandra.gemspec +61 -0
- data/conf/cassandra.in.sh +55 -0
- data/conf/log4j.properties +38 -0
- data/conf/storage-conf.xml +256 -0
- data/lib/cassandra.rb +21 -0
- data/lib/cassandra/array.rb +8 -0
- data/lib/cassandra/cassandra.rb +303 -0
- data/lib/cassandra/comparable.rb +28 -0
- data/lib/cassandra/constants.rb +8 -0
- data/lib/cassandra/helper.rb +85 -0
- data/lib/cassandra/long.rb +41 -0
- data/lib/cassandra/ordered_hash.rb +135 -0
- data/lib/cassandra/safe_client.rb +21 -0
- data/lib/cassandra/time.rb +9 -0
- data/lib/cassandra/uuid.rb +90 -0
- data/quickstart.sh +12 -0
- data/test/cassandra_test.rb +296 -0
- data/test/comparable_types_test.rb +45 -0
- data/vendor/gen-rb/cassandra.rb +1137 -0
- data/vendor/gen-rb/cassandra_constants.rb +8 -0
- data/vendor/gen-rb/cassandra_types.rb +237 -0
- metadata +109 -0
@@ -0,0 +1,237 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
module CassandraThrift
|
8
|
+
module ConsistencyLevel
|
9
|
+
ZERO = 0
|
10
|
+
ONE = 1
|
11
|
+
QUORUM = 2
|
12
|
+
ALL = 3
|
13
|
+
VALUE_MAP = {0 => "ZERO", 1 => "ONE", 2 => "QUORUM", 3 => "ALL"}
|
14
|
+
VALID_VALUES = Set.new([ZERO, ONE, QUORUM, ALL]).freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
class Column
|
18
|
+
include ::Thrift::Struct
|
19
|
+
NAME = 1
|
20
|
+
VALUE = 2
|
21
|
+
TIMESTAMP = 3
|
22
|
+
|
23
|
+
::Thrift::Struct.field_accessor self, :name, :value, :timestamp
|
24
|
+
FIELDS = {
|
25
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
26
|
+
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'},
|
27
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}
|
28
|
+
}
|
29
|
+
|
30
|
+
def struct_fields; FIELDS; end
|
31
|
+
|
32
|
+
def validate
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
class BatchMutation
|
38
|
+
include ::Thrift::Struct
|
39
|
+
KEY = 1
|
40
|
+
CFMAP = 2
|
41
|
+
|
42
|
+
::Thrift::Struct.field_accessor self, :key, :cfmap
|
43
|
+
FIELDS = {
|
44
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
45
|
+
CFMAP => {:type => ::Thrift::Types::MAP, :name => 'cfmap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => Column}}}
|
46
|
+
}
|
47
|
+
|
48
|
+
def struct_fields; FIELDS; end
|
49
|
+
|
50
|
+
def validate
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
class SuperColumn
|
56
|
+
include ::Thrift::Struct
|
57
|
+
NAME = 1
|
58
|
+
COLUMNS = 2
|
59
|
+
|
60
|
+
::Thrift::Struct.field_accessor self, :name, :columns
|
61
|
+
FIELDS = {
|
62
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
63
|
+
COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => Column}}
|
64
|
+
}
|
65
|
+
|
66
|
+
def struct_fields; FIELDS; end
|
67
|
+
|
68
|
+
def validate
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
class BatchMutationSuper
|
74
|
+
include ::Thrift::Struct
|
75
|
+
KEY = 1
|
76
|
+
CFMAP = 2
|
77
|
+
|
78
|
+
::Thrift::Struct.field_accessor self, :key, :cfmap
|
79
|
+
FIELDS = {
|
80
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
81
|
+
CFMAP => {:type => ::Thrift::Types::MAP, :name => 'cfmap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => SuperColumn}}}
|
82
|
+
}
|
83
|
+
|
84
|
+
def struct_fields; FIELDS; end
|
85
|
+
|
86
|
+
def validate
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
class CqlResult
|
92
|
+
include ::Thrift::Struct
|
93
|
+
ERROR_CODE = 1
|
94
|
+
ERROR_TXT = 2
|
95
|
+
RESULT_SET = 3
|
96
|
+
|
97
|
+
::Thrift::Struct.field_accessor self, :error_code, :error_txt, :result_set
|
98
|
+
FIELDS = {
|
99
|
+
ERROR_CODE => {:type => ::Thrift::Types::I32, :name => 'error_code'},
|
100
|
+
ERROR_TXT => {:type => ::Thrift::Types::STRING, :name => 'error_txt'},
|
101
|
+
RESULT_SET => {:type => ::Thrift::Types::LIST, :name => 'result_set', :element => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}}
|
102
|
+
}
|
103
|
+
|
104
|
+
def struct_fields; FIELDS; end
|
105
|
+
|
106
|
+
def validate
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
class NotFoundException < ::Thrift::Exception
|
112
|
+
include ::Thrift::Struct
|
113
|
+
|
114
|
+
FIELDS = {
|
115
|
+
|
116
|
+
}
|
117
|
+
|
118
|
+
def struct_fields; FIELDS; end
|
119
|
+
|
120
|
+
def validate
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
class InvalidRequestException < ::Thrift::Exception
|
126
|
+
include ::Thrift::Struct
|
127
|
+
def initialize(message=nil)
|
128
|
+
super()
|
129
|
+
self.why = message
|
130
|
+
end
|
131
|
+
|
132
|
+
def message; why end
|
133
|
+
|
134
|
+
WHY = 1
|
135
|
+
|
136
|
+
::Thrift::Struct.field_accessor self, :why
|
137
|
+
FIELDS = {
|
138
|
+
WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
|
139
|
+
}
|
140
|
+
|
141
|
+
def struct_fields; FIELDS; end
|
142
|
+
|
143
|
+
def validate
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
class UnavailableException < ::Thrift::Exception
|
149
|
+
include ::Thrift::Struct
|
150
|
+
|
151
|
+
FIELDS = {
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
def struct_fields; FIELDS; end
|
156
|
+
|
157
|
+
def validate
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
class ColumnParent
|
163
|
+
include ::Thrift::Struct
|
164
|
+
COLUMN_FAMILY = 3
|
165
|
+
SUPER_COLUMN = 4
|
166
|
+
|
167
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column
|
168
|
+
FIELDS = {
|
169
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
170
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true}
|
171
|
+
}
|
172
|
+
|
173
|
+
def struct_fields; FIELDS; end
|
174
|
+
|
175
|
+
def validate
|
176
|
+
end
|
177
|
+
|
178
|
+
end
|
179
|
+
|
180
|
+
class ColumnPath
|
181
|
+
include ::Thrift::Struct
|
182
|
+
COLUMN_FAMILY = 3
|
183
|
+
SUPER_COLUMN = 4
|
184
|
+
COLUMN = 5
|
185
|
+
|
186
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column, :column
|
187
|
+
FIELDS = {
|
188
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
189
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
|
190
|
+
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column'}
|
191
|
+
}
|
192
|
+
|
193
|
+
def struct_fields; FIELDS; end
|
194
|
+
|
195
|
+
def validate
|
196
|
+
end
|
197
|
+
|
198
|
+
end
|
199
|
+
|
200
|
+
class SuperColumnPath
|
201
|
+
include ::Thrift::Struct
|
202
|
+
COLUMN_FAMILY = 3
|
203
|
+
SUPER_COLUMN = 4
|
204
|
+
|
205
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column
|
206
|
+
FIELDS = {
|
207
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
208
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column'}
|
209
|
+
}
|
210
|
+
|
211
|
+
def struct_fields; FIELDS; end
|
212
|
+
|
213
|
+
def validate
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
class ColumnPathOrParent
|
219
|
+
include ::Thrift::Struct
|
220
|
+
COLUMN_FAMILY = 3
|
221
|
+
SUPER_COLUMN = 4
|
222
|
+
COLUMN = 5
|
223
|
+
|
224
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column, :column
|
225
|
+
FIELDS = {
|
226
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
227
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
|
228
|
+
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :optional => true}
|
229
|
+
}
|
230
|
+
|
231
|
+
def struct_fields; FIELDS; end
|
232
|
+
|
233
|
+
def validate
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
237
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: slillibri-cassandra
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: "0.4"
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Evan Weaver
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-07-30 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: json
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
description: A Ruby client for Cassandra.
|
26
|
+
email: ""
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- CHANGELOG
|
33
|
+
- lib/cassandra/array.rb
|
34
|
+
- lib/cassandra/cassandra.rb
|
35
|
+
- lib/cassandra/comparable.rb
|
36
|
+
- lib/cassandra/constants.rb
|
37
|
+
- lib/cassandra/helper.rb
|
38
|
+
- lib/cassandra/long.rb
|
39
|
+
- lib/cassandra/ordered_hash.rb
|
40
|
+
- lib/cassandra/safe_client.rb
|
41
|
+
- lib/cassandra/time.rb
|
42
|
+
- lib/cassandra/uuid.rb
|
43
|
+
- lib/cassandra.rb
|
44
|
+
- LICENSE
|
45
|
+
- README
|
46
|
+
- vendor/gen-rb/cassandra_constants.rb
|
47
|
+
- vendor/gen-rb/cassandra_types.rb
|
48
|
+
files:
|
49
|
+
- CHANGELOG
|
50
|
+
- conf/cassandra.in.sh
|
51
|
+
- conf/log4j.properties
|
52
|
+
- conf/storage-conf.xml
|
53
|
+
- lib/cassandra/array.rb
|
54
|
+
- lib/cassandra/cassandra.rb
|
55
|
+
- lib/cassandra/comparable.rb
|
56
|
+
- lib/cassandra/constants.rb
|
57
|
+
- lib/cassandra/helper.rb
|
58
|
+
- lib/cassandra/long.rb
|
59
|
+
- lib/cassandra/ordered_hash.rb
|
60
|
+
- lib/cassandra/safe_client.rb
|
61
|
+
- lib/cassandra/time.rb
|
62
|
+
- lib/cassandra/uuid.rb
|
63
|
+
- lib/cassandra.rb
|
64
|
+
- LICENSE
|
65
|
+
- Manifest
|
66
|
+
- quickstart.sh
|
67
|
+
- Rakefile
|
68
|
+
- README
|
69
|
+
- test/cassandra_test.rb
|
70
|
+
- test/comparable_types_test.rb
|
71
|
+
- vendor/gen-rb/cassandra.rb
|
72
|
+
- vendor/gen-rb/cassandra_constants.rb
|
73
|
+
- vendor/gen-rb/cassandra_types.rb
|
74
|
+
- cassandra.gemspec
|
75
|
+
has_rdoc: false
|
76
|
+
homepage: http://blog.evanweaver.com/files/doc/fauna/cassandra/
|
77
|
+
licenses:
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options:
|
80
|
+
- --line-numbers
|
81
|
+
- --inline-source
|
82
|
+
- --title
|
83
|
+
- Cassandra
|
84
|
+
- --main
|
85
|
+
- README
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: "0"
|
93
|
+
version:
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: "0.8"
|
99
|
+
version:
|
100
|
+
requirements: []
|
101
|
+
|
102
|
+
rubyforge_project: fauna
|
103
|
+
rubygems_version: 1.3.5
|
104
|
+
signing_key:
|
105
|
+
specification_version: 2
|
106
|
+
summary: A Ruby client for CassandraDB.
|
107
|
+
test_files:
|
108
|
+
- test/cassandra_test.rb
|
109
|
+
- test/comparable_types_test.rb
|