~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/resultset.proto

Added hook points and the interface for the Query Cache plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package drizzled.message;
 
2
option optimize_for = SPEED;
 
3
 
 
4
import "table.proto";
 
5
import "schema.proto";
 
6
import "transaction.proto";
 
7
 
 
8
/*
 
9
 * Represents a single record being returned
 
10
 *
 
11
 * @note 
 
12
 *
 
13
 * A ResultSet contains one or more SelectRecord submessages, each
 
14
 * of which represents a single record returned
 
15
 */
 
16
message SelectRecord
 
17
{
 
18
  repeated bytes record_value = 1;
 
19
}
 
20
 
 
21
message SelectHeader
 
22
{
 
23
  repeated TableMetadata table_metadata = 1; /* Minimal metadata about the table affected */
 
24
  repeated FieldMetadata field_metadata = 2; /* Collection of metadata about fields affected */
 
25
}
 
26
 
 
27
message SelectData
 
28
{
 
29
  required uint32 segment_id = 1; /* The segment number */
 
30
  required bool end_segment = 2; /* Is this the final segment? */
 
31
  repeated SelectRecord record = 3; /* The records inserted */
 
32
}
 
33
/*
 
34
 * The message is composed the hash of the query, 
 
35
 * a header (SelectHeader) containing metadata about:
 
36
 * returned tables and fields.
 
37
 * One or more data * segments (SelectData) containing the actual records
 
38
 * being returned.
 
39
 */
 
40
message Resultset
 
41
{
 
42
  required string key= 1; /* contains a hashed value of: query + schema*/
 
43
  required string schema= 2; /*current schema */
 
44
  optional string sql = 3; /* May contain the original SQL string */
 
45
  optional SelectHeader select_header = 4;
 
46
  optional SelectData select_data = 5;
 
47
}