~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/resultset.proto

  • Committer: Stewart Smith
  • Date: 2009-03-11 06:37:19 UTC
  • mto: (910.4.19 sparc) (937.2.1 sparc)
  • mto: This revision was merged to the branch mainline in revision 931.
  • Revision ID: stewart@flamingspork.com-20090311063719-v9iqjd00ts6260vv
batch up more INSERTs into transactions to help tests run quicker.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package drizzled.message;
2
 
option optimize_for = SPEED;
3
 
 
4
 
option java_package = "org.drizzle.messages";
5
 
option java_outer_classname = "ResultSetMessage";
6
 
 
7
 
import "table.proto";
8
 
import "schema.proto";
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
 
 
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;
49
 
  repeated bool is_null = 2;
50
 
}
51
 
 
52
 
message SelectHeader
53
 
{
54
 
  repeated TableMeta table_meta = 1; /* Minimal metadata about the table affected */
55
 
  repeated FieldMeta field_meta = 2; /* Collection of metadata about fields affected */
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
 
}