td-client 0.8.31 → 0.8.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ == 2012-10-09 version 0.8.32
3
+
4
+ * Added Client#swap_table
5
+
6
+
2
7
  == 2012-09-21 version 0.8.31
3
8
 
4
9
  * Added Job#db_name
@@ -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)
@@ -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})
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
 
3
- VERSION = '0.8.31'
3
+ VERSION = '0.8.32'
4
4
 
5
5
  end
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.31
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-22 00:00:00.000000000 Z
12
+ date: 2012-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack