1643.6.1
by Djellel E. Difallah
Added hook points and the interface for the Query Cache plugin |
1 |
package drizzled.message; |
2 |
option optimize_for = SPEED; |
|
3 |
||
1812.2.1
by David Shrewsbury
Add options to proto files for use when generating Java source files. |
4 |
option java_package = "org.drizzle.messages"; |
5 |
option java_outer_classname = "ResultSetMessage"; |
|
6 |
||
1643.6.1
by Djellel E. Difallah
Added hook points and the interface for the Query Cache plugin |
7 |
import "table.proto"; |
8 |
import "schema.proto"; |
|
1643.6.3
by Djellel E. Difallah
Refactoring of the QC Plugin's interface methods, adding mutual exclusion mechanism between sessions to cache a query, Store Meta inoformation of all the tables and select fields of the query |
9 |
|
10 |
||
11 |
/*
|
|
12 |
* Some minimal information transferred in the header of Statement
|
|
13 |
* submessage classes which identifies metadata about a specific
|
|
14 |
* field involved in a Statemet.
|
|
15 |
*/
|
|
16 |
message FieldMeta |
|
17 |
{
|
|
18 |
required string field_name = 1; /* Name of the field */ |
|
19 |
optional string field_alias = 2; |
|
20 |
required string table_name = 3; |
|
21 |
optional string table_alias = 4; |
|
22 |
required string schema_name = 5; |
|
23 |
}
|
|
24 |
||
25 |
/*
|
|
26 |
* Minimal information transferred in the header of Statement submessage
|
|
27 |
* classes which identifies metadata about the schema objects being
|
|
28 |
* modified in a Statement.
|
|
29 |
*/
|
|
30 |
message TableMeta |
|
31 |
{
|
|
32 |
required string schema_name = 1; /* Name of the containing schema */ |
|
33 |
required string table_name = 2; /* Name of the table */ |
|
34 |
optional string table_alias = 3; /* alias if defined */ |
|
35 |
}
|
|
36 |
||
1643.6.1
by Djellel E. Difallah
Added hook points and the interface for the Query Cache plugin |
37 |
|
38 |
/*
|
|
39 |
* Represents a single record being returned
|
|
40 |
*
|
|
41 |
* @note
|
|
42 |
*
|
|
43 |
* A ResultSet contains one or more SelectRecord submessages, each
|
|
44 |
* of which represents a single record returned
|
|
45 |
*/
|
|
46 |
message SelectRecord |
|
47 |
{
|
|
48 |
repeated bytes record_value = 1; |
|
1643.6.14
by Djellel E. Difallah
Added the Table Based Invalidation and its test suite |
49 |
repeated bool is_null = 2; |
1643.6.1
by Djellel E. Difallah
Added hook points and the interface for the Query Cache plugin |
50 |
}
|
51 |
||
52 |
message SelectHeader |
|
53 |
{
|
|
1643.6.3
by Djellel E. Difallah
Refactoring of the QC Plugin's interface methods, adding mutual exclusion mechanism between sessions to cache a query, Store Meta inoformation of all the tables and select fields of the query |
54 |
repeated TableMeta table_meta = 1; /* Minimal metadata about the table affected */ |
55 |
repeated FieldMeta field_meta = 2; /* Collection of metadata about fields affected */ |
|
1643.6.1
by Djellel E. Difallah
Added hook points and the interface for the Query Cache plugin |
56 |
}
|
57 |
||
58 |
message SelectData |
|
59 |
{
|
|
60 |
required uint32 segment_id = 1; /* The segment number */ |
|
61 |
required bool end_segment = 2; /* Is this the final segment? */ |
|
62 |
repeated SelectRecord record = 3; /* The records inserted */ |
|
63 |
}
|
|
64 |
/*
|
|
65 |
* The message is composed the hash of the query,
|
|
66 |
* a header (SelectHeader) containing metadata about:
|
|
67 |
* returned tables and fields.
|
|
68 |
* One or more data * segments (SelectData) containing the actual records
|
|
69 |
* being returned.
|
|
70 |
*/
|
|
71 |
message Resultset |
|
72 |
{
|
|
73 |
required string key= 1; /* contains a hashed value of: query + schema*/ |
|
74 |
required string schema= 2; /*current schema */ |
|
75 |
optional string sql = 3; /* May contain the original SQL string */ |
|
76 |
optional SelectHeader select_header = 4; |
|
77 |
optional SelectData select_data = 5; |
|
78 |
}
|