You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.2 KiB
Protocol Buffer
76 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package command;
|
|
|
|
option go_package = "github.com/rqlite/rqlite/command";
|
|
|
|
message Parameter {
|
|
oneof value {
|
|
sint64 i = 1;
|
|
double d = 2;
|
|
bool b = 3;
|
|
bytes y = 4;
|
|
string s = 5;
|
|
}
|
|
}
|
|
|
|
message Statement {
|
|
string sql = 1;
|
|
repeated Parameter parameters = 2;
|
|
}
|
|
|
|
message Request {
|
|
bool transaction = 1;
|
|
repeated Statement statements = 2;
|
|
}
|
|
|
|
message QueryRequest {
|
|
Request request = 1;
|
|
bool timings = 2;
|
|
enum Level {
|
|
QUERY_REQUEST_LEVEL_NONE = 0;
|
|
QUERY_REQUEST_LEVEL_WEAK = 1;
|
|
QUERY_REQUEST_LEVEL_STRONG = 2;
|
|
}
|
|
Level level = 3;
|
|
int64 freshness = 4;
|
|
}
|
|
|
|
message Values {
|
|
repeated Parameter parameters = 1;
|
|
}
|
|
|
|
message QueryRows {
|
|
repeated string columns = 1;
|
|
repeated string types = 2;
|
|
repeated Values values = 3;
|
|
string error = 4;
|
|
double time = 5;
|
|
}
|
|
|
|
message ExecuteRequest {
|
|
Request request = 1;
|
|
bool timings = 2;
|
|
}
|
|
|
|
message ExecuteResult {
|
|
int64 last_insert_id = 1;
|
|
int64 rows_affected = 2;
|
|
string error = 3;
|
|
double time = 4;
|
|
}
|
|
|
|
message Noop {
|
|
string id = 1;
|
|
}
|
|
|
|
message Command {
|
|
enum Type {
|
|
COMMAND_TYPE_UNKNOWN = 0;
|
|
COMMAND_TYPE_QUERY = 1;
|
|
COMMAND_TYPE_EXECUTE = 2;
|
|
COMMAND_TYPE_NOOP = 3;
|
|
}
|
|
Type type = 1;
|
|
bytes sub_command = 2;
|
|
bool compressed = 3;
|
|
} |