ali_ots 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/ali_ots.rb +127 -0
- data/lib/ali_ots/client.rb +183 -0
- data/lib/ali_ots/connection.rb +118 -0
- data/lib/ali_ots/metas/batch_get_row_request.rb +17 -0
- data/lib/ali_ots/metas/batch_get_row_response.rb +17 -0
- data/lib/ali_ots/metas/batch_write_row_request.rb +17 -0
- data/lib/ali_ots/metas/batch_write_row_response.rb +17 -0
- data/lib/ali_ots/metas/capacity_unit.rb +19 -0
- data/lib/ali_ots/metas/column.rb +19 -0
- data/lib/ali_ots/metas/column_schema.rb +18 -0
- data/lib/ali_ots/metas/column_update.rb +21 -0
- data/lib/ali_ots/metas/column_value.rb +27 -0
- data/lib/ali_ots/metas/condition.rb +16 -0
- data/lib/ali_ots/metas/consumed_capacity.rb +17 -0
- data/lib/ali_ots/metas/create_table_request.rb +18 -0
- data/lib/ali_ots/metas/delete_row_in_batch_write_row_request.rb +19 -0
- data/lib/ali_ots/metas/delete_row_request.rb +21 -0
- data/lib/ali_ots/metas/delete_row_response.rb +17 -0
- data/lib/ali_ots/metas/delete_table_request.rb +17 -0
- data/lib/ali_ots/metas/describe_table_request.rb +16 -0
- data/lib/ali_ots/metas/describe_table_response.rb +18 -0
- data/lib/ali_ots/metas/enums/column_type.rb +32 -0
- data/lib/ali_ots/metas/enums/direction.rb +21 -0
- data/lib/ali_ots/metas/enums/operation_type.rb +22 -0
- data/lib/ali_ots/metas/enums/row_existence_expectation.rb +21 -0
- data/lib/ali_ots/metas/error.rb +19 -0
- data/lib/ali_ots/metas/get_range_request.rb +27 -0
- data/lib/ali_ots/metas/get_range_response.rb +21 -0
- data/lib/ali_ots/metas/get_row_request.rb +21 -0
- data/lib/ali_ots/metas/get_row_response.rb +18 -0
- data/lib/ali_ots/metas/list_table_request.rb +14 -0
- data/lib/ali_ots/metas/list_table_response.rb +16 -0
- data/lib/ali_ots/metas/put_row_in_batch_write_row_request.rb +21 -0
- data/lib/ali_ots/metas/put_row_request.rb +22 -0
- data/lib/ali_ots/metas/put_row_response.rb +17 -0
- data/lib/ali_ots/metas/reserved_throughput.rb +16 -0
- data/lib/ali_ots/metas/reserved_throughput_details.rb +22 -0
- data/lib/ali_ots/metas/row.rb +19 -0
- data/lib/ali_ots/metas/row_in_batch_get_row_request.rb +17 -0
- data/lib/ali_ots/metas/row_in_batch_get_row_response.rb +23 -0
- data/lib/ali_ots/metas/row_in_batch_write_row_response.rb +21 -0
- data/lib/ali_ots/metas/table_in_batch_get_row_request.rb +21 -0
- data/lib/ali_ots/metas/table_in_batch_get_row_response.rb +20 -0
- data/lib/ali_ots/metas/table_in_batch_write_row_request.rb +23 -0
- data/lib/ali_ots/metas/table_in_batch_write_row_response.rb +23 -0
- data/lib/ali_ots/metas/table_meta.rb +18 -0
- data/lib/ali_ots/metas/table_primary_key.rb +21 -0
- data/lib/ali_ots/metas/update_row_in_batch_write_row_request.rb +21 -0
- data/lib/ali_ots/metas/update_row_request.rb +22 -0
- data/lib/ali_ots/metas/update_row_response.rb +17 -0
- data/lib/ali_ots/metas/update_table_request.rb +18 -0
- data/lib/ali_ots/metas/update_table_response.rb +16 -0
- data/lib/ali_ots/version.rb +3 -0
- metadata +138 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#用于在操作失败时的响应消息中表示错误信息,以及在BatchGetRow和BatchWriteRow操作的响应消息中表示单行请求的错误。
|
4
|
+
class Error < ::Protobuf::Message
|
5
|
+
required :string, :code, 1
|
6
|
+
optional :string, :message, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
Error {
|
15
|
+
required string code = 1;
|
16
|
+
optional string message = 2;
|
17
|
+
}
|
18
|
+
|
19
|
+
=end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#读取指定主键范围内的数据。
|
4
|
+
class GetRangeRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1;
|
6
|
+
required AliOts::Metas::Enums::Direction, :direction, 2;
|
7
|
+
repeated :string, :columns_to_get, 3;
|
8
|
+
optional :int32, :limit, 4;
|
9
|
+
repeated AliOts::Metas::Column, :inclusive_start_primary_key, 5;
|
10
|
+
repeated AliOts::Metas::Column, :exclusive_end_primary_key, 6;
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
=begin
|
18
|
+
message GetRangeRequest {
|
19
|
+
required string table_name = 1;
|
20
|
+
required Direction direction = 2;
|
21
|
+
repeated string columns_to_get = 3;
|
22
|
+
optional int32 limit = 4;
|
23
|
+
repeated Column inclusive_start_primary_key = 5;
|
24
|
+
repeated Column exclusive_end_primary_key = 6;
|
25
|
+
}
|
26
|
+
|
27
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#读取指定主键范围内的数据。
|
4
|
+
class GetRangeResponse < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::ConsumedCapacity, :consumed, 1
|
6
|
+
repeated AliOts::Metas::Column, :next_start_primary_key, 2
|
7
|
+
repeated AliOts::Metas::Row, :rows, 3
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message GetRangeResponse {
|
16
|
+
required ConsumedCapacity consumed = 1;
|
17
|
+
repeated Column next_start_primary_key = 2;
|
18
|
+
repeated Row rows = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#根据给定的主键读取单行数据。
|
4
|
+
class GetRowRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
repeated AliOts::Metas::Column, :primary_key, 2
|
7
|
+
repeated :string, :columns_to_get, 3
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message GetRowRequest {
|
16
|
+
required string table_name = 1;
|
17
|
+
repeated Column primary_key = 2;
|
18
|
+
repeated string columns_to_get = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#根据给定的主键读取单行数据。
|
4
|
+
class GetRowResponse < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::ConsumedCapacity, :consumed, 1
|
6
|
+
required AliOts::Metas::Row, :row, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message GetRowResponse {
|
15
|
+
required ConsumedCapacity consumed = 1;
|
16
|
+
required Row row = 2;
|
17
|
+
}
|
18
|
+
=end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#查询指定表的结构信息和预留读写吞吐量设置信息。
|
4
|
+
class ListTableResponse < ::Protobuf::Message
|
5
|
+
repeated :string, :table_names, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message ListTableResponse {
|
14
|
+
repeated string table_names = 1;
|
15
|
+
}
|
16
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchWriteRow操作中,表示要插入的一行信息。
|
4
|
+
class PutRowInBatchWriteRowRequest < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::Condition, :condition, 1
|
6
|
+
repeated AliOts::Metas::Column, :primary_key, 2
|
7
|
+
repeated AliOts::Metas::Column, :attribute_columns, 3
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message PutRowInBatchWriteRowRequest {
|
16
|
+
required Condition condition = 1;
|
17
|
+
repeated Column primary_key = 2;
|
18
|
+
repeated Column attribute_columns = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#插入数据到指定的行,如果该行不存在,则新增一行;若该行存在,则覆盖原有行。
|
4
|
+
class PutRowRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
required AliOts::Metas::Condition, :condition, 2
|
7
|
+
repeated AliOts::Metas::Column, :primary_key, 3
|
8
|
+
repeated AliOts::Metas::Column, :attribute_columns, 4
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
message PutRowRequest {
|
17
|
+
required string table_name = 1;
|
18
|
+
required Condition condition = 2;
|
19
|
+
repeated Column primary_key = 3;
|
20
|
+
repeated Column attribute_columns = 4;
|
21
|
+
}
|
22
|
+
=end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#插入数据到指定的行,如果该行不存在,则新增一行;若该行存在,则覆盖原有行。
|
4
|
+
class PutRowResponse < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::ConsumedCapacity, :consumed, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message PutRowResponse {
|
14
|
+
required ConsumedCapacity consumed = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#表示一个表设置的预留读写吞吐量数值。
|
4
|
+
class ReservedThroughput < ::Protobuf::Message
|
5
|
+
required ::AliOts::Metas::CapacityUnit, :capacity_unit, 1;
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message ReservedThroughput {
|
14
|
+
required CapacityUnit capacity_unit = 1;
|
15
|
+
}
|
16
|
+
=end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#更新指定表的预留读吞吐量或预留写吞吐量设置,新设定将于更新成功一分钟内生效。
|
4
|
+
class ReservedThroughputDetails < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::CapacityUnit, :capacity_unit, 1
|
6
|
+
required :int64, :last_increase_time, 2
|
7
|
+
optional :int64, :last_decrease_time, 3
|
8
|
+
required :int32, :number_of_decreases_today, 4
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
message ReservedThroughputDetails {
|
17
|
+
required CapacityUnit capacity_unit = 1;
|
18
|
+
required int64 last_increase_time = 2;
|
19
|
+
optional int64 last_decrease_time = 3;
|
20
|
+
required int32 number_of_decreases_today = 4;
|
21
|
+
}
|
22
|
+
=end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在GetRow和GetRange的响应消息中,表示一行数据。
|
4
|
+
class Row < ::Protobuf::Message
|
5
|
+
repeated AliOts::Metas::Column, :primary_key_columns, 1
|
6
|
+
repeated AliOts::Metas::Column, :attribute_columns, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message Row {
|
15
|
+
repeated Column primary_key_columns = 1;
|
16
|
+
repeated Column attribute_columns = 2;
|
17
|
+
}
|
18
|
+
|
19
|
+
=end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchGetRow操作中,表示要读取的一行请求信息。
|
4
|
+
class RowInBatchGetRowRequest < ::Protobuf::Message
|
5
|
+
repeated AliOts::Metas::Column, :primary_key, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message RowInBatchGetRowRequest {
|
14
|
+
repeated Column primary_key = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchGetRow操作的返回消息中,表示一行数据。
|
4
|
+
class RowInBatchGetRowResponse < ::Protobuf::Message
|
5
|
+
required :bool, :is_ok, 1;
|
6
|
+
optional AliOts::Metas::Error, :error, 2;
|
7
|
+
optional AliOts::Metas::ConsumedCapacity, :consumed, 3
|
8
|
+
optional AliOts::Metas::Row, :row, 4
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
message RowInBatchGetRowResponse {
|
17
|
+
required bool is_ok = 1 [default = true];
|
18
|
+
optional Error error = 2;
|
19
|
+
optional ConsumedCapacity consumed = 3;
|
20
|
+
optional Row row = 4;
|
21
|
+
}
|
22
|
+
|
23
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchWriteRow操作的返回消息中,表示一行写入操作的结果。
|
4
|
+
class RowInBatchWriteRowResponse < ::Protobuf::Message
|
5
|
+
required :bool, :is_ok, 1
|
6
|
+
optional AliOts::Metas::Error, :error, 2
|
7
|
+
optional AliOts::Metas::ConsumedCapacity, :consumed, 3
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message RowInBatchWriteRowResponse {
|
16
|
+
required bool is_ok = 1 [default = true];
|
17
|
+
optional Error error = 2;
|
18
|
+
optional ConsumedCapacity consumed = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchGetRow操作中,表示要读取的一个表的请求信息。
|
4
|
+
class TableInBatchGetRowRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1;
|
6
|
+
repeated AliOts::Metas::RowInBatchGetRowRequest, :rows, 2;
|
7
|
+
repeated :string, :columns_to_get, 3;
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message TableInBatchGetRowRequest {
|
16
|
+
required string table_name = 1;
|
17
|
+
repeated RowInBatchGetRowRequest rows = 2;
|
18
|
+
repeated string columns_to_get = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchGetRow操作的返回消息中,表示一个表的数据。
|
4
|
+
class TableInBatchGetRowResponse < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
repeated AliOts::Metas::RowInBatchGetRowResponse, :rows, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message TableInBatchGetRowResponse {
|
15
|
+
required string table_name = 1;
|
16
|
+
repeated RowInBatchGetRowResponse rows = 2;
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
=end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchWriteRow操作中,表示要写入的一个表的请求信息。
|
4
|
+
class TableInBatchWriteRowRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
repeated AliOts::Metas::PutRowInBatchWriteRowRequest, :put_rows, 2
|
7
|
+
repeated AliOts::Metas::UpdateRowInBatchWriteRowRequest, :update_rows, 3
|
8
|
+
repeated AliOts::Metas::DeleteRowInBatchWriteRowRequest, :delete_rows, 4
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
message TableInBatchWriteRowRequest {
|
17
|
+
required string table_name = 1;
|
18
|
+
repeated PutRowInBatchWriteRowRequest put_rows = 2;
|
19
|
+
repeated UpdateRowInBatchWriteRowRequest update_rows = 3;
|
20
|
+
repeated DeleteRowInBatchWriteRowRequest delete_rows = 4;
|
21
|
+
}
|
22
|
+
|
23
|
+
=end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchWriteRow操作中,表示对一个表进行写入的结果。
|
4
|
+
class TableInBatchWriteRowResponse < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
repeated AliOts::Metas::RowInBatchWriteRowResponse, :put_rows, 2
|
7
|
+
repeated AliOts::Metas::RowInBatchWriteRowResponse, :update_rows, 3
|
8
|
+
repeated AliOts::Metas::RowInBatchWriteRowResponse, :delete_rows, 4
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
message TableInBatchWriteRowResponse {
|
17
|
+
required string table_name = 1;
|
18
|
+
repeated RowInBatchWriteRowResponse put_rows = 2;
|
19
|
+
repeated RowInBatchWriteRowResponse update_rows = 3;
|
20
|
+
repeated RowInBatchWriteRowResponse delete_rows = 4;
|
21
|
+
}
|
22
|
+
|
23
|
+
=end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#表示一个表的结构信息。
|
4
|
+
class TableMeta < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
repeated AliOts::Metas::ColumnSchema, :primary_key, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message TableMeta {
|
15
|
+
required string table_name = 1;
|
16
|
+
repeated ColumnSchema primary_key = 2;
|
17
|
+
}
|
18
|
+
=end
|