td-client 0.8.31 → 0.8.32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/lib/td/client.rb +5 -0
- data/lib/td/client/api.rb +9 -0
- data/lib/td/client/version.rb +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
data/lib/td/client.rb
CHANGED
@@ -81,6 +81,11 @@ class Client
|
|
81
81
|
@api.create_item_table(db_name, table_name)
|
82
82
|
end
|
83
83
|
|
84
|
+
# => true
|
85
|
+
def swap_table(db_name, table_name1, table_name2)
|
86
|
+
@api.swap_table(db_name, table_name1, table_name2)
|
87
|
+
end
|
88
|
+
|
84
89
|
# => true
|
85
90
|
def update_schema(db_name, table_name, schema)
|
86
91
|
@api.update_schema(db_name, table_name, schema.to_json)
|
data/lib/td/client/api.rb
CHANGED
@@ -277,6 +277,15 @@ class API
|
|
277
277
|
end
|
278
278
|
private :create_table
|
279
279
|
|
280
|
+
# => true
|
281
|
+
def swap_table(db, table1, table2)
|
282
|
+
code, body, res = post("/v3/table/swap/#{e db}/#{e table1}/#{e table2}")
|
283
|
+
if code != "200"
|
284
|
+
raise_error("Swap tables failed", res)
|
285
|
+
end
|
286
|
+
return true
|
287
|
+
end
|
288
|
+
|
280
289
|
# => true
|
281
290
|
def update_schema(db, table, schema_json)
|
282
291
|
code, body, res = post("/v3/table/update-schema/#{e db}/#{e table}", {'schema'=>schema_json})
|
data/lib/td/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.32
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09
|
12
|
+
date: 2012-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|