18 #ifndef NDB_QUERY_TREE_HPP
19 #define NDB_QUERY_TREE_HPP
21 #include <ndb_global.h>
22 #include <ndb_types.h>
39 static Uint32 getOpType(Uint32 op_len) {
return op_len & 0xFFFF;}
40 static Uint32 getLength(Uint32 op_len) {
return op_len >> 16;}
42 static void setOpLen(Uint32 &d, Uint32 o, Uint32 l) { d = (l << 16) | o;}
64 static Uint32 getOpType(Uint32 op_len) {
return op_len & 0xFFFF;}
65 static Uint32 getLength(Uint32 op_len) {
return op_len >> 16;}
67 static void setOpLen(Uint32 &d, Uint32 o, Uint32 l) { d = (l << 16) | o;}
89 NI_LINKED_ATTR = 0x10,
91 NI_ATTR_INTERPRET = 0x20,
92 NI_ATTR_PARAMS = 0x40,
93 NI_ATTR_LINKED = 0x80,
156 STATIC_CONST ( NodeSize = 4 );
186 STATIC_CONST ( NodeSize = 3 );
203 STATIC_CONST ( NodeSize = 4 );
220 STATIC_CONST ( NodeSize = 3 );
237 STATIC_CONST( NodeSize = 4 );
249 SI_PRUNE_PARAMS = 0x20000,
252 SI_PRUNE_LINKED = 0x40000,
255 SI_PARALLEL = 0x80000,
276 STATIC_CONST ( NodeSize = 4 );
278 STATIC_CONST ( BatchRowBits = 11 );
311 static Uint32 getNodeCnt(Uint32 cnt_len) {
return cnt_len & 0xFFFF;}
312 static Uint32 getLength(Uint32 cnt_len) {
return cnt_len >> 16;}
313 static void setCntLen(Uint32 &d, Uint32 c, Uint32 l) { d=(l << 16) | c;}
330 P_PARAM_HEADER = 0x6,
335 static Uint32 getType(
const Uint32 info) {
return info >> 16;}
340 static Uint32
getLength(Uint32 info) {
return info & 0xFFFF;}
341 static Uint32 data(Uint32 length)
343 assert(length <= 0xFFFF);
344 return (P_DATA << 16) | length;
350 static Uint32
getColNo(Uint32 info) {
return info & 0xFFFF;}
351 static Uint32 col(Uint32 no) {
return (P_COL << 16) | no; }
356 static Uint32
colPk(Uint32 no) {
return (P_UNQ_PK << 16) | no; }
361 static Uint32
getParamNo(Uint32 info) {
return info & 0xFFFF;}
362 static Uint32 param(Uint32 no) {
return (P_PARAM << 16) | no; }
364 static Uint32 paramHeader(Uint32 no) {
return (P_PARAM_HEADER << 16) | no; }
369 static Uint32
attrInfo(Uint32 no) {
return (P_ATTRINFO << 16) | no;}
375 static Uint32
parent(Uint32 no) {
return (P_PARENT << 16) | no;}