MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / GEN_expr

Function GEN_expr

src/dsql/gen.cpp:104–137  ·  view source on GitHub ↗

GEN_expr @brief Generate blr for an arbitrary expression. @param dsqlScratch @param node **/

Source from the content-addressed store, hash-verified

102
103 **/
104void GEN_expr(DsqlCompilerScratch* dsqlScratch, ExprNode* node)
105{
106 RseNode* rseNode = nodeAs<RseNode>(node);
107 if (rseNode)
108 {
109 GEN_rse(dsqlScratch, rseNode);
110 return;
111 }
112
113 node->genBlr(dsqlScratch);
114
115 // Check whether the node we just processed is for a dialect 3
116 // operation which gives a different result than the corresponding
117 // operation in dialect 1. If it is, and if the client dialect is 2,
118 // issue a warning about the difference.
119
120 // ASF: Shouldn't we check nod_gen_id2 too?
121
122 const char* compatDialectVerb;
123
124 if (node->getKind() == DmlNode::KIND_VALUE && dsqlScratch->clientDialect == SQL_DIALECT_V6_TRANSITION &&
125 (compatDialectVerb = node->getCompatDialectVerb()))
126 {
127 dsc desc;
128 DsqlDescMaker::fromNode(dsqlScratch, &desc, static_cast<ValueExprNode*>(node));
129
130 if (desc.dsc_dtype == dtype_int64)
131 {
132 ERRD_post_warning(
133 Arg::Warning(isc_dsql_dialect_warning_expr) <<
134 Arg::Str(compatDialectVerb));
135 }
136 }
137}
138
139/**
140

Callers 11

putLocalVariableMethod · 0.85
genBlrMethod · 0.85
genBlrMethod · 0.85
GEN_rseFunction · 0.85
GEN_sortFunction · 0.85
genBlrMethod · 0.85
genBlrMethod · 0.85
genParametersMethod · 0.85
genOptionalExprMethod · 0.85
genBlrMethod · 0.85
genMapMethod · 0.85

Calls 7

GEN_rseFunction · 0.85
ERRD_post_warningFunction · 0.85
WarningClass · 0.85
StrClass · 0.85
genBlrMethod · 0.45
getKindMethod · 0.45
getCompatDialectVerbMethod · 0.45

Tested by

no test coverage detected