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,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#批量读取一个或多个表中的若干行数据。
|
4
|
+
class BatchGetRowResponse < ::Protobuf::Message
|
5
|
+
repeated AliOts::Metas::TableInBatchGetRowResponse, :tables, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message BatchGetRowResponse {
|
14
|
+
repeated TableInBatchGetRowResponse tables = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#批量插入,修改或删除一个或多个表中的若干行数据。
|
4
|
+
class BatchWriteRowRequest < ::Protobuf::Message
|
5
|
+
repeated AliOts::Metas::TableInBatchWriteRowRequest, :tables, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message BatchWriteRowRequest {
|
14
|
+
repeated TableInBatchWriteRowRequest tables = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchWriteRow操作中,表示对一个表进行写入的结果。
|
4
|
+
class BatchWriteRowResponse < ::Protobuf::Message
|
5
|
+
repeated AliOts::Metas::TableInBatchWriteRowResponse, :tables, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message BatchWriteRowResponse {
|
14
|
+
repeated TableInBatchWriteRowResponse tables = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#表示一次操作消耗服务能力单元的值或是一个表的预留读写吞吐量的值。
|
4
|
+
class CapacityUnit < ::Protobuf::Message
|
5
|
+
optional :int32, :read, 1
|
6
|
+
optional :int32, :write, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message CapacityUnit {
|
15
|
+
optional int32 read = 1;
|
16
|
+
optional int32 write = 2;
|
17
|
+
}
|
18
|
+
=end
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#表示一列。
|
4
|
+
class Column < ::Protobuf::Message
|
5
|
+
required :string, :name, 1
|
6
|
+
required AliOts::Metas::ColumnValue, :value, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message Column {
|
15
|
+
required string name = 1;
|
16
|
+
required ColumnValue value = 2;
|
17
|
+
}
|
18
|
+
|
19
|
+
=end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#定义一列,只用于主键列。
|
4
|
+
class ColumnSchema < ::Protobuf::Message
|
5
|
+
required :string, :name, 1;
|
6
|
+
required ::AliOts::Metas::Enums::ColumnType, :type, 2;
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message ColumnSchema {
|
15
|
+
required string name = 1;
|
16
|
+
required ColumnType type = 2;
|
17
|
+
}
|
18
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在UpdateRow中,表示更新一列的信息。
|
4
|
+
class ColumnUpdate < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::Enums::OperationType, :type, 1;
|
6
|
+
required :string, :name, 2;
|
7
|
+
optional AliOts::Metas::ColumnValue, :value, 3;
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message ColumnUpdate {
|
16
|
+
required OperationType type = 1;
|
17
|
+
required string name = 2;
|
18
|
+
optional ColumnValue value = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#表示一列的列值。
|
4
|
+
class ColumnValue < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::Enums::ColumnType, :type, 1;
|
6
|
+
optional :int64, :v_int, 2
|
7
|
+
optional :string, :v_string, 3
|
8
|
+
optional :bool, :v_bool, 4
|
9
|
+
optional :double, :v_double, 5
|
10
|
+
optional :bytes, :v_binary, 6
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
=begin
|
18
|
+
message ColumnValue {
|
19
|
+
required ColumnType type = 1;
|
20
|
+
optional int64 v_int = 2;
|
21
|
+
optional string v_string = 3;
|
22
|
+
optional bool v_bool = 4;
|
23
|
+
optional double v_double = 5;
|
24
|
+
optional bytes v_binary = 6;
|
25
|
+
}
|
26
|
+
|
27
|
+
=end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在PutRow,UpdateRow和DeleteRow中使用的行判断条件,目前只含有row_existence一项。
|
4
|
+
class Condition < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::Enums::RowExistenceExpectation, :row_existence, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message Condition {
|
14
|
+
required RowExistenceExpectation row_existence = 1;
|
15
|
+
}
|
16
|
+
=end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#表示一次操作消耗的服务能力单元。
|
4
|
+
class ConsumedCapacity < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::CapacityUnit, :consumed, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message ConsumedCapacity {
|
14
|
+
required CapacityUnit capacity_unit = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#根据给定的表结构信息创建相应的表。
|
4
|
+
class CreateTableRequest < ::Protobuf::Message
|
5
|
+
required ::AliOts::Metas::TableMeta, :table_meta, 1
|
6
|
+
required ::AliOts::Metas::ReservedThroughput, :reserved_throughput, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message CreateTableRequest {
|
15
|
+
required TableMeta table_meta = 1;
|
16
|
+
required ReservedThroughput reserved_throughput = 2;
|
17
|
+
}
|
18
|
+
=end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#在BatchWriteRow操作中,表示要删除的一行信息。
|
4
|
+
class DeleteRowInBatchWriteRowRequest < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::Condition, :condition, 1
|
6
|
+
repeated AliOts::Metas::Column, :primary_key, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message DeleteRowInBatchWriteRowRequest {
|
15
|
+
required Condition condition = 1;
|
16
|
+
repeated Column primary_key = 2;
|
17
|
+
}
|
18
|
+
|
19
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#删除一行数据。
|
4
|
+
class DeleteRowRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
required AliOts::Metas::Condition, :condition, 2
|
7
|
+
repeated AliOts::Metas::Column, :primary_key, 3
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
message DeleteRowRequest {
|
16
|
+
required string table_name = 1;
|
17
|
+
required Condition condition = 2;
|
18
|
+
repeated Column primary_key = 3;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#删除一行数据。
|
4
|
+
class DeleteRowResponse < ::Protobuf::Message
|
5
|
+
required AliOts::Metas::ConsumedCapacity, :consumed, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message DeleteRowResponse {
|
14
|
+
required ConsumedCapacity consumed = 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
=end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#查询指定表的结构信息和预留读写吞吐量设置信息。
|
4
|
+
class DescribeTableRequest < ::Protobuf::Message
|
5
|
+
required :string, :table_name, 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
=begin
|
13
|
+
message DescribeTableRequest {
|
14
|
+
required string table_name = 1;
|
15
|
+
}
|
16
|
+
=end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
#查询指定表的结构信息和预留读写吞吐量设置信息。
|
4
|
+
class DescribeTableResponse < ::Protobuf::Message
|
5
|
+
required ::AliOts::Metas::TableMeta, :table_meta, 1
|
6
|
+
required ::AliOts::Metas::ReservedThroughput, :reserved_throughput, 2
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
=begin
|
14
|
+
message DescribeTableResponse {
|
15
|
+
required TableMeta table_meta = 1;
|
16
|
+
required ReservedThroughputDetails reserved_throughput_details = 2;
|
17
|
+
}
|
18
|
+
=end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
module Enums
|
4
|
+
#表示一列的数据类型,枚举类型。
|
5
|
+
#INF_MIN和INF_MAX为GetRange操作专用类型,value的type为INF_MIN的Column为小于其它所有Column,value的type为INF_MAX的Column大于其它所有Column。
|
6
|
+
class ColumnType < ::Protobuf::Enum
|
7
|
+
define :INF_MIN, 0
|
8
|
+
define :INF_MAX, 1
|
9
|
+
define :INTEGER, 2
|
10
|
+
define :STRING, 3
|
11
|
+
define :BOOLEAN, 4
|
12
|
+
define :DOUBLE, 5
|
13
|
+
define :BINARY, 6
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
=begin
|
23
|
+
enum ColumnType {
|
24
|
+
INF_MIN = 0;
|
25
|
+
INF_MAX = 1;
|
26
|
+
INTEGER = 2;
|
27
|
+
STRING = 3;
|
28
|
+
BOOLEAN = 4;
|
29
|
+
DOUBLE = 5;
|
30
|
+
BINARY = 6;
|
31
|
+
}
|
32
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
module Enums
|
4
|
+
#在GetRange操作中,查询数据的顺序。
|
5
|
+
class Direction < ::Protobuf::Enum
|
6
|
+
define :FORWARD, 0
|
7
|
+
define :BACKWARD, 1
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
enum Direction {
|
17
|
+
FORWARD = 0;
|
18
|
+
BACKWARD = 1;
|
19
|
+
}
|
20
|
+
|
21
|
+
=end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
module Enums
|
4
|
+
#在UpdateRow中,表示对一列的修改方式。
|
5
|
+
class OperationType < ::Protobuf::Enum
|
6
|
+
define :PUT, 1
|
7
|
+
define :DELETE, 2
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
enum OperationType {
|
17
|
+
PUT = 1;
|
18
|
+
DELETE = 2;
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
=end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module AliOts
|
2
|
+
module Metas
|
3
|
+
module Enums
|
4
|
+
class RowExistenceExpectation < ::Protobuf::Enum
|
5
|
+
define :IGNORE, 0
|
6
|
+
define :EXPECT_EXIST, 1;
|
7
|
+
define :EXPECT_NOT_EXIST, 2;
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
=begin
|
16
|
+
enum RowExistenceExpectation {
|
17
|
+
IGNORE = 0;
|
18
|
+
EXPECT_EXIST = 1;
|
19
|
+
EXPECT_NOT_EXIST = 2;
|
20
|
+
}
|
21
|
+
=end
|