DP
Size: a a a
DP
VI
service Fabex {
rpc GetByTxId(Entry) returns (stream Entry);
rpc GetByBlocknum(Entry) returns (stream Entry);
rpc GetBlockInfoByPayload(Entry) returns (stream Entry);
}
message Entry {
string channelid = 1;
string txid = 2;
string hash = 3;
string previoushash = 4;
uint64 blocknum = 5;
string payload = 6;
int64 time = 7;
}
Entry
, но когда мы вызываем GetByTxId
, то заполняем только поле txid
(GetByTxId(pb.Entry{Txid:"b10e65732"})
), когда вызываем GetByBlocknum
, то заполняем поле Blocknum
соответственно. Не очень умно, да?service Fabex {
rpc Explore(RequestRange) returns (stream Entry);
rpc GetByTxId(TxID) returns (stream Entry);
rpc GetByBlocknum(Blocknum) returns (stream Entry);
rpc GetBlockInfoByPayload(Payload) returns (stream Entry);
}
message RequestRange {
int64 startblock = 1;
int64 endblock = 2;
}
message Entry {
string channelid = 1;
string txid = 2;
string hash = 3;
string previoushash = 4;
uint64 blocknum = 5;
string payload = 6;
int64 time = 7;
}
message TxID {
string value = 1;
}
message Blocknum {
string value = 1;
}
message Payload {
string payload = 1;
}
RS
service Fabex {
rpc GetByTxId(Entry) returns (stream Entry);
rpc GetByBlocknum(Entry) returns (stream Entry);
rpc GetBlockInfoByPayload(Entry) returns (stream Entry);
}
message Entry {
string channelid = 1;
string txid = 2;
string hash = 3;
string previoushash = 4;
uint64 blocknum = 5;
string payload = 6;
int64 time = 7;
}
Entry
, но когда мы вызываем GetByTxId
, то заполняем только поле txid
(GetByTxId(pb.Entry{Txid:"b10e65732"})
), когда вызываем GetByBlocknum
, то заполняем поле Blocknum
соответственно. Не очень умно, да?service Fabex {
rpc Explore(RequestRange) returns (stream Entry);
rpc GetByTxId(TxID) returns (stream Entry);
rpc GetByBlocknum(Blocknum) returns (stream Entry);
rpc GetBlockInfoByPayload(Payload) returns (stream Entry);
}
message RequestRange {
int64 startblock = 1;
int64 endblock = 2;
}
message Entry {
string channelid = 1;
string txid = 2;
string hash = 3;
string previoushash = 4;
uint64 blocknum = 5;
string payload = 6;
int64 time = 7;
}
message TxID {
string value = 1;
}
message Blocknum {
string value = 1;
}
message Payload {
string payload = 1;
}
VI
RS
RS
Get(ID) Object
Get([]ID) []Object
VI
rpc Get(Entry) returns (stream Entry);
VI
Get(ID) Object
Get([]ID) []Object
RS
rpc Get(Entry) returns (stream Entry);
RS
SELECT WHERE id = “x”
SELECT WHERE id IN […]
VI
VI
SELECT WHERE id = “x”
SELECT WHERE id IN […]
RS
SELECT WHERE id = “x”
SELECT WHERE id IN […]
NK
RS
NK
RS