DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
QueryPlanSerializers.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 using System.Collections.Generic;
19 using System.IO;
20 
22 using Deveel.Data.Services;
24 using Deveel.Data.Sql.Tables;
25 
26 namespace Deveel.Data.Sql.Query {
27  public static class QueryPlanSerializers {
28  public static readonly IObjectSerializerResolver Resolver = new QueryPlanNodeSerializerResolver();
29 
30  internal static void RegisterSerializers(ISystemContext context) {
31  context.RegisterService<CacheNodePointSerializer>();
32  context.RegisterService<CompositeNodeSerializer>();
33  context.RegisterService<ConstantSelectNodeSerializer>();
34  context.RegisterService<CreateFunctionNodeSerializer>();
35  context.RegisterService<DistinctNodeSerializer>();
36  context.RegisterService<EquiJoinNodeSerializer>();
37  context.RegisterService<ExhaustiveSelectNodeSerializer>();
38  context.RegisterService<FetchTableNodeSerializer>();
39  context.RegisterService<FetchViewNodeSerializer>();
40  context.RegisterService<GroupNodeSerializer>();
41  context.RegisterService<JoinNodeSerializer>();
42  context.RegisterService<LeftOuterJoinNodeSerializer>();
43  context.RegisterService<LogicalUnionNodeSerializer>();
44  context.RegisterService<MarkerNodeSerializer>();
45  context.RegisterService<NaturalJoinNodeSerializer>();
46  context.RegisterService<NonCorrelatedAnyAllNodeSerializer>();
47  context.RegisterService<RageSelectNodeSerializer>();
48  context.RegisterService<SimplePatternSelectNodeSerializer>();
49  context.RegisterService<SimpleSelectNodeSerializer>();
50  context.RegisterService<SingleRowTableNodeSerializer>();
51  context.RegisterService<SortNodeSerializer>();
52  context.RegisterService<SubsetNodeSerializer>();
53  context.RegisterService<LimitNodeSerializer>();
54  }
55 
56  public static void Serialize(IQueryPlanNode queryPlan, BinaryWriter writer) {
57  var nodeType = queryPlan.GetType();
58  var seriializer = Resolver.ResolveSerializer(nodeType) as IObjectBinarySerializer;
59  if (seriializer == null)
60  throw new InvalidOperationException(String.Format("Could not find any serializer for type '{0}'.", nodeType));
61 
62  seriializer.Serialize(queryPlan, writer);
63  }
64 
65  public static IQueryPlanNode Deserialize(Type nodeType, Stream inputStream) {
66  var seriializer = Resolver.ResolveSerializer(nodeType);
67  if (seriializer == null)
68  throw new InvalidOperationException(String.Format("Could not find any serializer for type '{0}'.", nodeType));
69 
70  return seriializer.Deserialize(inputStream) as IQueryPlanNode;
71  }
72 
73  public static IQueryPlanNode Deserialize(Type nodeType, BinaryReader reader) {
74  var seriializer = Resolver.ResolveSerializer(nodeType) as IObjectBinarySerializer;
75  if (seriializer == null)
76  throw new InvalidOperationException(String.Format("Could not find any serializer for type '{0}'.", nodeType));
77 
78  return (IQueryPlanNode) seriializer.Deserialize(reader);
79  }
80 
81  private static void WriteChildNode(BinaryWriter writer, IQueryPlanNode node) {
82  if (node == null) {
83  writer.Write((byte) 0);
84  } else {
85  var nodeTypeString = node.GetType().FullName;
86  writer.Write((byte)1);
87  writer.Write(nodeTypeString);
88 
89  Serialize(node, writer);
90  }
91  }
92 
93  private static IQueryPlanNode ReadChildNode(BinaryReader reader) {
94  var state = reader.ReadByte();
95  if (state == 0)
96  return null;
97 
98  var typeString = reader.ReadString();
99 #if PCL
100  var type = Type.GetType(typeString, true);
101 #else
102  var type = Type.GetType(typeString, true, true);
103 #endif
104 
105  return Deserialize(type, reader);
106  }
107 
108  private static void WriteArray<T>(T[] arrary, BinaryWriter writer, Action<T, BinaryWriter> write) {
109  var count = arrary == null ? 0 : arrary.Length;
110  writer.Write(count);
111 
112  if (arrary != null) {
113  for (int i = 0; i < count; i++) {
114  write(arrary[i], writer);
115  }
116  }
117  }
118 
119  private static void WriteObjectNames(ObjectName[] names, BinaryWriter writer) {
120  WriteArray(names, writer, ObjectName.Serialize);
121  }
122 
123  private static void WriteExpressions(SqlExpression[] expressions, BinaryWriter writer) {
124  WriteArray(expressions, writer, (expression, binaryWriter) => SqlExpression.Serialize(expression, binaryWriter));
125  }
126 
127  private static void WriteStrings(string[] array, BinaryWriter writer) {
128  WriteArray(array, writer, (s, binaryWriter) => binaryWriter.Write(s));
129  }
130 
131  private static T[] ReadArray<T>(BinaryReader reader, Func<BinaryReader, T> read) {
132  var count = reader.ReadInt32();
133  var list = new List<T>(count);
134  for (int i = 0; i < count; i++) {
135  var obj = read(reader);
136  list.Add(obj);
137  }
138 
139  return list.ToArray();
140  }
141 
142  private static ObjectName[] ReadObjectNames(BinaryReader reader) {
143  return ReadArray(reader, ObjectName.Deserialize);
144  }
145 
146  private static SqlExpression[] ReadExpressions(BinaryReader reader) {
147  return ReadArray(reader, binaryReader => SqlExpression.Deserialize(reader));
148  }
149 
150  private static string[] ReadStrings(BinaryReader reader) {
151  return ReadArray(reader, binaryReader => binaryReader.ReadString());
152  }
153 
154  #region QueryPlanNodeSerializerResolver
155 
157  protected override void Init() {
158  Register<CachePointNode, CacheNodePointSerializer>();
159  Register<CompositeNode, CompositeNodeSerializer>();
160  Register<ConstantSelectNode, ConstantSelectNodeSerializer>();
161  Register<CreateFunctionsNode, CreateFunctionNodeSerializer>();
162  Register<DistinctNode, DistinctNodeSerializer>();
163  Register<EquiJoinNode, EquiJoinNodeSerializer>();
164  Register<ExhaustiveSelectNode, ExhaustiveSelectNodeSerializer>();
165  Register<FetchTableNode, FetchTableNodeSerializer>();
166  Register<FetchViewNode, FetchViewNodeSerializer>();
167  Register<GroupNode, GroupNodeSerializer>();
168  Register<JoinNode, JoinNodeSerializer>();
169  Register<LeftOuterJoinNode, LeftOuterJoinNodeSerializer>();
170  Register<LogicalUnionNode, LogicalUnionNodeSerializer>();
171  Register<MarkerNode, MarkerNodeSerializer>();
172  Register<NaturalJoinNode, NaturalJoinNodeSerializer>();
173  Register<NonCorrelatedAnyAllNode, NonCorrelatedAnyAllNodeSerializer>();
174  Register<RangeSelectNode, RageSelectNodeSerializer>();
175  Register<SimplePatternSelectNode, SimplePatternSelectNodeSerializer>();
176  Register<SimpleSelectNode, SimpleSelectNodeSerializer>();
177  Register<SingleRowTableNode, SingleRowTableNodeSerializer>();
178  Register<SortNode, SortNodeSerializer>();
179  Register<SubsetNode, SubsetNodeSerializer>();
180  Register<LimitNode, LimitNodeSerializer>();
181  }
182  }
183 
184  #endregion
185 
186  #region QueryPlanNodeSerializer
187 
188  abstract class QueryPlanNodeSerializer<TNode> : ObjectBinarySerializer<TNode>, IQueryPlanNodeSerializer where TNode : class, IQueryPlanNode {
189  public bool CanSerialize(Type nodeType) {
190  return nodeType == typeof (TNode);
191  }
192  }
193 
194  #endregion
195 
196  #region CacheNodePointSerializer
197 
199  public override void Serialize(CachePointNode node, BinaryWriter writer) {
200  WriteChildNode(writer, node.Child);
201  writer.Write(node.Id);
202  }
203 
204  public override CachePointNode Deserialize(BinaryReader reader) {
205  var child = ReadChildNode(reader);
206  var id = reader.ReadInt64();
207  return new CachePointNode(child, id);
208  }
209  }
210 
211  #endregion
212 
213  #region CompositeNodeSerializer
214 
216  public override void Serialize(CompositeNode node, BinaryWriter writer) {
217  WriteChildNode(writer, node.Left);
218  WriteChildNode(writer, node.Right);
219 
220  writer.Write(node.All);
221  writer.Write((byte)node.CompositeFunction);
222  }
223 
224  public override CompositeNode Deserialize(BinaryReader reader) {
225  var left = ReadChildNode(reader);
226  var right = ReadChildNode(reader);
227  bool all = reader.ReadBoolean();
228  var function = (CompositeFunction) reader.ReadByte();
229 
230  return new CompositeNode(left, right, function, all);
231  }
232  }
233 
234  #endregion
235 
236  #region ConstantSelectNodeSerializer
237 
239  public override void Serialize(ConstantSelectNode node, BinaryWriter writer) {
240  WriteChildNode(writer, node.Child);
241  SqlExpression.Serialize(node.Expression, writer);
242  }
243 
244  public override ConstantSelectNode Deserialize(BinaryReader reader) {
245  var child = ReadChildNode(reader);
246  var expression = SqlExpression.Deserialize(reader);
247 
248  return new ConstantSelectNode(child, expression);
249  }
250  }
251 
252  #endregion
253 
254  #region CreateFunctionNodeSerializer
255 
257  public override void Serialize(CreateFunctionsNode node, BinaryWriter writer) {
258  WriteChildNode(writer, node.Child);
259  WriteExpressions(node.Functions, writer);
260  WriteStrings(node.Names, writer);
261  }
262 
263  public override CreateFunctionsNode Deserialize(BinaryReader reader) {
264  var child = ReadChildNode(reader);
265 
266  var functions = ReadExpressions(reader);
267  var names = ReadStrings(reader);
268 
269  return new CreateFunctionsNode(child, functions, names);
270  }
271  }
272 
273  #endregion
274 
275  #region DistinctNodeSerializer
276 
278  public override void Serialize(DistinctNode node, BinaryWriter writer) {
279  WriteChildNode(writer, node.Child);
280  WriteObjectNames(node.ColumnNames, writer);
281  }
282 
283  public override DistinctNode Deserialize(BinaryReader reader) {
284  var child = ReadChildNode(reader);
285  var names = ReadObjectNames(reader);
286 
287  return new DistinctNode(child, names);
288  }
289  }
290 
291  #endregion
292 
293  #region EquiJoinNodeSerializer
294 
296  public override void Serialize(EquiJoinNode node, BinaryWriter writer) {
297  WriteChildNode(writer, node.Left);
298  WriteChildNode(writer, node.Right);
299 
300  WriteObjectNames(node.LeftColumns, writer);
301  WriteObjectNames(node.RightColumns, writer);
302  }
303 
304  public override EquiJoinNode Deserialize(BinaryReader reader) {
305  var leftNode = ReadChildNode(reader);
306  var rightNode = ReadChildNode(reader);
307 
308  var leftColNames = ReadObjectNames(reader);
309  var rightColNames = ReadObjectNames(reader);
310 
311  return new EquiJoinNode(leftNode, rightNode, leftColNames, rightColNames);
312  }
313  }
314 
315  #endregion
316 
317  #region ExhaustiveSelectNodeSerializer
318 
320  public override void Serialize(ExhaustiveSelectNode node, BinaryWriter writer) {
321  WriteChildNode(writer, node.Child);
322  SqlExpression.Serialize(node.Expression, writer);
323  }
324 
325  public override ExhaustiveSelectNode Deserialize(BinaryReader reader) {
326  var child = ReadChildNode(reader);
327  var expression = SqlExpression.Deserialize(reader);
328 
329  return new ExhaustiveSelectNode(child, expression);
330  }
331  }
332 
333  #endregion
334 
335  #region FetchTableNodeSerializer
336 
338  public override void Serialize(FetchTableNode node, BinaryWriter writer) {
339  ObjectName.Serialize(node.TableName, writer);
340  ObjectName.Serialize(node.AliasName, writer);
341  }
342 
343  public override FetchTableNode Deserialize(BinaryReader reader) {
344  var tableName = ObjectName.Deserialize(reader);
345  var alias = ObjectName.Deserialize(reader);
346 
347  return new FetchTableNode(tableName, alias);
348  }
349  }
350 
351  #endregion
352 
353  #region FetchViewNodeSerializer
354 
355 
357  public override void Serialize(FetchViewNode node, BinaryWriter writer) {
358  ObjectName.Serialize(node.ViewName, writer);
359  ObjectName.Serialize(node.AliasName, writer);
360  }
361 
362  public override FetchViewNode Deserialize(BinaryReader reader) {
363  var viewName = ObjectName.Deserialize(reader);
364  var aliasName = ObjectName.Deserialize(reader);
365 
366  return new FetchViewNode(viewName, aliasName);
367  }
368  }
369 
370  #endregion
371 
372  #region GroupNodeSerializer
373 
375  public override void Serialize(GroupNode node, BinaryWriter writer) {
376  WriteChildNode(writer, node.Child);
377  WriteObjectNames(node.ColumnNames, writer);
378 
379  ObjectName.Serialize(node.GroupMaxColumn, writer);
380 
381  WriteExpressions(node.Functions, writer);
382  WriteStrings(node.Names, writer);
383  }
384 
385  public override GroupNode Deserialize(BinaryReader reader) {
386  var child = ReadChildNode(reader);
387  var colNames = ReadObjectNames(reader);
388  var groupMax = ObjectName.Deserialize(reader);
389  var functions = ReadExpressions(reader);
390  var names = ReadStrings(reader);
391 
392  return new GroupNode(child, colNames, groupMax, functions, names);
393  }
394  }
395 
396  #endregion
397 
398  #region JoinNodeSerializer
399 
401  public override void Serialize(JoinNode node, BinaryWriter writer) {
402  WriteChildNode(writer, node.Left);
403  WriteChildNode(writer, node.Right);
404 
405  ObjectName.Serialize(node.LeftColumnName, writer);
406 
407  writer.Write((byte)node.Operator);
408 
410  }
411 
412  public override JoinNode Deserialize(BinaryReader reader) {
413  var left = ReadChildNode(reader);
414  var right = ReadChildNode(reader);
415 
416  var leftColumnName = ObjectName.Deserialize(reader);
417  var op = (SqlExpressionType) reader.ReadByte();
418  var rightExpression = SqlExpression.Deserialize(reader);
419 
420  return new JoinNode(left, right, leftColumnName, op, rightExpression);
421  }
422  }
423 
424  #endregion
425 
426  #region LeftOuterJoinNodeSerializer
427 
429  public override void Serialize(LeftOuterJoinNode node, BinaryWriter writer) {
430  WriteChildNode(writer, node.Child);
431  writer.Write(node.MarkerName);
432  }
433 
434  public override LeftOuterJoinNode Deserialize(BinaryReader reader) {
435  var child = ReadChildNode(reader);
436  var markerName = reader.ReadString();
437 
438  return new LeftOuterJoinNode(child, markerName);
439  }
440  }
441 
442  #endregion
443 
444  #region LogicalUnionNodeSerializer
445 
447  public override void Serialize(LogicalUnionNode node, BinaryWriter writer) {
448  WriteChildNode(writer, node.Left);
449  WriteChildNode(writer, node.Right);
450  }
451 
452  public override LogicalUnionNode Deserialize(BinaryReader reader) {
453  var left = ReadChildNode(reader);
454  var right = ReadChildNode(reader);
455 
456  return new LogicalUnionNode(left, right);
457  }
458  }
459 
460  #endregion
461 
462  #region MarkerNodeSerializer
463 
465  public override void Serialize(MarkerNode node, BinaryWriter writer) {
466  WriteChildNode(writer, node.Child);
467  writer.Write(node.MarkName);
468  }
469 
470  public override MarkerNode Deserialize(BinaryReader reader) {
471  var child = ReadChildNode(reader);
472  var markerName = reader.ReadString();
473 
474  return new MarkerNode(child, markerName);
475  }
476  }
477 
478  #endregion
479 
480  #region NaturalJoinNodeSerializer
481 
483  public override void Serialize(NaturalJoinNode node, BinaryWriter writer) {
484  WriteChildNode(writer, node.Left);
485  WriteChildNode(writer, node.Right);
486  }
487 
488  public override NaturalJoinNode Deserialize(BinaryReader reader) {
489  var left = ReadChildNode(reader);
490  var right = ReadChildNode(reader);
491 
492  return new NaturalJoinNode(left, right);
493  }
494  }
495 
496  #endregion
497 
498  #region NonCorrelatedAnyAllNodeSerializer
499 
501  public override void Serialize(NonCorrelatedAnyAllNode node, BinaryWriter writer) {
502  WriteChildNode(writer, node.Left);
503  WriteChildNode(writer, node.Right);
504 
505  WriteObjectNames(node.LeftColumnNames, writer);
506  writer.Write((byte)node.SubQueryType);
507  }
508 
509  public override NonCorrelatedAnyAllNode Deserialize(BinaryReader reader) {
510  var left = ReadChildNode(reader);
511  var right = ReadChildNode(reader);
512 
513  var columnNames = ReadObjectNames(reader);
514  var subQueryType = (SqlExpressionType) reader.ReadByte();
515 
516  return new NonCorrelatedAnyAllNode(left, right, columnNames, subQueryType);
517  }
518  }
519 
520  #endregion
521 
522  #region RangeSelectNodeSerializer
523 
525  public override void Serialize(RangeSelectNode node, BinaryWriter writer) {
526  WriteChildNode(writer, node.Child);
527  SqlExpression.Serialize(node.Expression, writer);
528  }
529 
530  public override RangeSelectNode Deserialize(BinaryReader reader) {
531  var child = ReadChildNode(reader);
532  var expression = SqlExpression.Deserialize(reader);
533 
534  return new RangeSelectNode(child, expression);
535  }
536  }
537 
538  #endregion
539 
540  #region SimplePatternSelectNodeSerializer
541 
543  public override void Serialize(SimplePatternSelectNode node, BinaryWriter writer) {
544  WriteChildNode(writer, node.Child);
545  SqlExpression.Serialize(node.Expression, writer);
546  }
547 
548  public override SimplePatternSelectNode Deserialize(BinaryReader reader) {
549  var child = ReadChildNode(reader);
550  var expression = SqlExpression.Deserialize(reader);
551 
552  return new SimplePatternSelectNode(child, expression);
553  }
554  }
555 
556  #endregion
557 
558  #region SimpleSelectNodeSerializer
559 
561  public override void Serialize(SimpleSelectNode node, BinaryWriter writer) {
562  WriteChildNode(writer, node.Child);
563  ObjectName.Serialize(node.ColumnName, writer);
564  writer.Write((byte)node.OperatorType);
565  SqlExpression.Serialize(node.Expression, writer);
566  }
567 
568  public override SimpleSelectNode Deserialize(BinaryReader reader) {
569  var child = ReadChildNode(reader);
570  var columnName = ObjectName.Deserialize(reader);
571  var opType = (SqlExpressionType) reader.ReadByte();
572  var expression = SqlExpression.Deserialize(reader);
573 
574  return new SimpleSelectNode(child, columnName, opType, expression);
575  }
576  }
577 
578  #endregion
579 
580  #region SingleRowTableNodeSerializer
581 
583  public override void Serialize(SingleRowTableNode node, BinaryWriter writer) {
584  }
585 
586  public override SingleRowTableNode Deserialize(BinaryReader reader) {
587  return new SingleRowTableNode();
588  }
589  }
590 
591  #endregion
592 
593  #region SortNodeSerializer
594 
596  public override void Serialize(SortNode node, BinaryWriter writer) {
597  WriteChildNode(writer, node.Child);
598  WriteObjectNames(node.ColumnNames, writer);
599  WriteArray(node.Ascending, writer, (b, binaryWriter) => binaryWriter.Write(b));
600  }
601 
602  public override SortNode Deserialize(BinaryReader reader) {
603  var child = ReadChildNode(reader);
604  var columnNames = ReadObjectNames(reader);
605  var ascending = ReadArray(reader, binaryReader => binaryReader.ReadBoolean());
606 
607  return new SortNode(child, columnNames, ascending);
608  }
609  }
610 
611  #endregion
612 
613  #region SubsetNodeSerializer
614 
616  public override void Serialize(SubsetNode node, BinaryWriter writer) {
617  WriteChildNode(writer, node.Child);
618  WriteObjectNames(node.OriginalColumnNames, writer);
619  WriteObjectNames(node.AliasColumnNames, writer);
620  }
621 
622  public override SubsetNode Deserialize(BinaryReader reader) {
623  var child = ReadChildNode(reader);
624  var columnNames = ReadObjectNames(reader);
625  var aliasNames = ReadObjectNames(reader);
626 
627  return new SubsetNode(child, columnNames, aliasNames);
628  }
629  }
630 
631  #endregion
632 
633  #region LimitNodeSerializer
634 
636  public override void Serialize(LimitNode obj, BinaryWriter writer) {
637  WriteChildNode(writer, obj.Child);
638  writer.Write(obj.Offset);
639  writer.Write(obj.Count);
640  }
641 
642  public override LimitNode Deserialize(BinaryReader reader) {
643  var child = ReadChildNode(reader);
644  var offset = reader.ReadInt64();
645  var count = reader.ReadInt64();
646 
647  return new LimitNode(child, offset, count);
648  }
649  }
650 
651  #endregion
652  }
653 }
IQueryPlanNode Right
Gets the right node of the branch query plan node.
override void Serialize(NonCorrelatedAnyAllNode node, BinaryWriter writer)
bool All
If this is true, the composite includes all results from both children, otherwise removes deplicates...
A branch node for performing a composite function on two child nodes.
static IQueryPlanNode ReadChildNode(BinaryReader reader)
string[] Names
The list of names to give each function table.
ObjectName AliasName
The name to alias the table as.
override void Serialize(DistinctNode node, BinaryWriter writer)
The execution context of a database system, that is defining the configurations and the components us...
static IQueryPlanNode Deserialize(Type nodeType, BinaryReader reader)
static IQueryPlanNode Deserialize(Type nodeType, Stream inputStream)
IQueryPlanNode Child
Gets the single child node of the plan.
static void WriteObjectNames(ObjectName[] names, BinaryWriter writer)
The node for evaluating an expression that contains entirely constant values (no variables).
A query to the database to select data from a set of tables and columns.
SqlExpression Expression
A simple expression that represents the range to select. See the class comments for a description for...
static void Serialize(ObjectName objectName, Stream stream)
Definition: ObjectName.cs:287
static void WriteExpressions(SqlExpression[] expressions, BinaryWriter writer)
override void Serialize(NaturalJoinNode node, BinaryWriter writer)
override void Serialize(MarkerNode node, BinaryWriter writer)
override void Serialize(FetchViewNode node, BinaryWriter writer)
Describes the name of an object within a database.
Definition: ObjectName.cs:44
static ObjectName[] ReadObjectNames(BinaryReader reader)
SqlExpressionType Operator
Definition: JoinNode.cs:43
static ObjectName Deserialize(Stream stream)
Definition: ObjectName.cs:311
override void Serialize(LogicalUnionNode node, BinaryWriter writer)
static void Serialize(SqlExpression expression, BinaryWriter writer)
SqlExpressionType
All the possible type of SqlExpression supported
The node for performing a simple indexed query on a single column of the child node.
static void RegisterSerializers(ISystemContext context)
A node element of a query plan tree. /summary>
The node for performing a simple select operation on a table.
A marker node that takes the result of a child and marks it as a name that can later be retrieved...
Definition: MarkerNode.cs:32
A user-defined TYPE that holds complex objects in a database column.
override void Serialize(FetchTableNode node, BinaryWriter writer)
override void Serialize(SingleRowTableNode node, BinaryWriter writer)
The node for merging the child node with a set of new function columns over the entire result...
static void WriteStrings(string[] array, BinaryWriter writer)
static SqlExpression Deserialize(BinaryReader reader)
SqlExpression[] Functions
The list of functions to create.
override void Serialize(ExhaustiveSelectNode node, BinaryWriter writer)
static string[] ReadStrings(BinaryReader reader)
SqlExpression RightExpression
Definition: JoinNode.cs:45
override NonCorrelatedAnyAllNode Deserialize(BinaryReader reader)
override void Serialize(LeftOuterJoinNode node, BinaryWriter writer)
The node for performing a exhaustive select operation on the child node.
static void Serialize(IQueryPlanNode queryPlan, BinaryWriter writer)
A branch node for a left outer join.
SqlExpression Expression
The search expression.
override void Serialize(LimitNode obj, BinaryWriter writer)
override void Serialize(RangeSelectNode node, BinaryWriter writer)
ObjectName TableName
The name of the table to fetch.
override void Serialize(CachePointNode node, BinaryWriter writer)
static SqlExpression[] ReadExpressions(BinaryReader reader)
CompositeFunction CompositeFunction
The composite operation.
override void Serialize(CompositeNode node, BinaryWriter writer)
override SimplePatternSelectNode Deserialize(BinaryReader reader)
void Serialize(object obj, BinaryWriter writer)
A branch node for naturally joining two tables together.
override void Serialize(JoinNode node, BinaryWriter writer)
override void Serialize(EquiJoinNode node, BinaryWriter writer)
override void Serialize(SortNode node, BinaryWriter writer)
override void Serialize(ConstantSelectNode node, BinaryWriter writer)
CompositeFunction
The kind of composite function in a CompositeTable.
Defines the base class for instances that represent SQL expression tree nodes.
static void WriteChildNode(BinaryWriter writer, IQueryPlanNode node)
override void Serialize(CreateFunctionsNode node, BinaryWriter writer)
override void Serialize(SubsetNode node, BinaryWriter writer)
IQueryPlanNode Left
Gets the left node of the branch query plan node.
The node for fetching a table from the current transaction.
override void Serialize(SimpleSelectNode node, BinaryWriter writer)
override void Serialize(GroupNode node, BinaryWriter writer)
override void Serialize(SimplePatternSelectNode node, BinaryWriter writer)