ali_ots 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8172fa691d991156c6d158a1213d8a6d7589f8aa
4
- data.tar.gz: bb245a29a197ae6a62ffc848249c158cc98185f2
3
+ metadata.gz: 37a5d22183cd846cd63e2e6757483bb1b6d1ff3b
4
+ data.tar.gz: 4bcff8d636cfada5927451a319c1a4661d4e5f73
5
5
  SHA512:
6
- metadata.gz: f1391e81b061da8aa5dc0bcd618debc5c49e492e4be2d0b99ef6158d4e4ddb067c2cea4658e40e7a212c5bc8f0a8a033470f250414fd99d53f014e89ff2d06c6
7
- data.tar.gz: 0b4d76743dc888383116c86fbfbfef6a64e6be01f51c7d1742f222a3b4e159f9f96c7a21a17e48b7891e8d7e3174d6616a3f8b9f21357adfb1cb940c5e4d50aa
6
+ metadata.gz: 49d048a417ceab7d76f3fbfe0d8857d334c32db178df7f76f5f58004ba291e0c16a93bf4b2921990e5942bf4d9fd51c584604b0c29986ffb0b39baebcc388e34
7
+ data.tar.gz: 757e2b791875c3970f1472cf810570d74e5cf529dfbc4f54c47af4a7713665f5a0efaba8547951efdf499753d1608f222fd2c0aa72dd666a854c5e5b4c862dac
@@ -19,7 +19,7 @@ module AliOts
19
19
  self.conn.request("CreateTable", request_meta)
20
20
  end
21
21
 
22
- # 删除
22
+ # 删除表
23
23
  # example:
24
24
  # client.delete_table("myTable")
25
25
  def delete_table(table_name)
@@ -41,7 +41,6 @@ module AliOts
41
41
 
42
42
  # 更新表
43
43
  # example:
44
- # schema_of_primary_keys = [AliOts::Metas::ColumnSchema.new(name: 'id', type: AliOts::Metas::Enums::ColumnType::INTEGER)]
45
44
  #
46
45
  # client.update_table("myTable", 9, 9)
47
46
  def update_table(table_name, capacity_read, capacity_write)
@@ -84,7 +83,7 @@ module AliOts
84
83
  return status, body, response_status
85
84
  end
86
85
 
87
- # 根据给定的主键读取单行数据。
86
+ # 根据给定的主键读取单行数据
88
87
  # example:
89
88
  # primary_keys = [AliOts::Metas::Column.new(name: "id", value: AliOts::Metas::ColumnValue.new(type: AliOts::Metas::Enums::ColumnType::INTEGER, v_int: 1))]
90
89
  # columns = ["user_name", "age"]
@@ -98,7 +97,7 @@ module AliOts
98
97
  return status, body, response_status
99
98
  end
100
99
 
101
- # 更新指定行的数据,如果该行不存在,则新增一行;若该行存在,则根据请求的内容在这一行中新增、修改或者删除指定列的值。
100
+ # 更新指定行的数据,如果该行不存在,则新增一行;若该行存在,则根据请求的内容在这一行中新增、修改或者删除指定列的值
102
101
  # example:
103
102
  # condition_type = AliOts::Metas::Enums::RowExistenceExpectation::IGNORE
104
103
  # primary_keys = [AliOts::Metas::Column.new(name: "id", value: AliOts::Metas::ColumnValue.new(type: AliOts::Metas::Enums::ColumnType::INTEGER, v_int: 1))]
@@ -154,6 +153,7 @@ module AliOts
154
153
  # rows = [row]
155
154
  # table1 = AliOts::Metas::TableInBatchGetRowRequest.new(table_name: "myTable", rows: rows, columns_to_get: ['name', 'age'])
156
155
  # tables = [table1]
156
+ #
157
157
  # client.batch_get_row(tables)
158
158
  def batch_get_row(tables)
159
159
  request_meta = AliOts::Metas::BatchGetRowRequest.new(tables: tables)
@@ -163,7 +163,7 @@ module AliOts
163
163
  return status, body, response_status
164
164
  end
165
165
 
166
- # 批量插入,修改或删除一个或多个表中的若干行数据。
166
+ # 批量插入,修改或删除一个或多个表中的若干行数据
167
167
  # example:
168
168
  # condition = AliOts::Metas::Condition.new(row_existence: AliOts::Metas::Enums::RowExistenceExpectation::EXPECT_NOT_EXIST)
169
169
  # primary_keys = [AliOts::Metas::Column.new(name: "id", value: AliOts::Metas::ColumnValue.new(type: AliOts::Metas::Enums::ColumnType::INTEGER, v_int: 100))]
@@ -171,6 +171,7 @@ module AliOts
171
171
  # row1 = AliOts::Metas::PutRowInBatchWriteRowRequest.new(condition: condition, primary_key: primary_keys, attribute_columns: columns)
172
172
  # rows = [row1]
173
173
  # tables = [AliOts::Metas::TableInBatchWriteRowRequest.new(table_name: 'myTable', put_rows: rows)]
174
+ #
174
175
  # client.batch_write_row(tables)
175
176
  def batch_write_row(tables)
176
177
  request_meta = AliOts::Metas::BatchWriteRowRequest.new(tables: tables)
@@ -18,7 +18,7 @@ module AliOts
18
18
  self.logger.info body.to_json
19
19
 
20
20
  headers ||= {}
21
- url = AliOts::END_POSITION + "/" + action
21
+ url = AliOts::CONFIG[:END_POSITION] + "/" + action
22
22
  serialize_body = body.serialize_to_string
23
23
  ots_headers = make_headers(url, serialize_body)
24
24
  headers.merge!(ots_headers)
@@ -1,3 +1,3 @@
1
1
  module AliOts
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ali_ots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Backkom