@@ -232,7 +232,7 @@ public Void visitLiteralVariableNode(final LiteralVariableNode node, Context p)
232232 location .getSql (),
233233 location .getLineNumber (),
234234 location .getPosition (),
235- node .getText ());
235+ node .getVariableName ());
236236 }
237237 };
238238 return visitValueNode (node , p , validator .andThen (p ::addLiteralValue ));
@@ -286,31 +286,31 @@ public Void visitEmbeddedVariableNode(EmbeddedVariableNode node, Context p) {
286286 location .getSql (),
287287 location .getLineNumber (),
288288 location .getPosition (),
289- node .getText ());
289+ node .getVariableName ());
290290 }
291291 if (fragment .indexOf (';' ) > -1 ) {
292292 throw new JdbcException (
293293 Message .DOMA2117 ,
294294 location .getSql (),
295295 location .getLineNumber (),
296296 location .getPosition (),
297- node .getText ());
297+ node .getVariableName ());
298298 }
299299 if (fragment .indexOf ("--" ) > -1 ) {
300300 throw new JdbcException (
301301 Message .DOMA2122 ,
302302 location .getSql (),
303303 location .getLineNumber (),
304304 location .getPosition (),
305- node .getText ());
305+ node .getVariableName ());
306306 }
307307 if (fragment .indexOf ("/*" ) > -1 ) {
308308 throw new JdbcException (
309309 Message .DOMA2123 ,
310310 location .getSql (),
311311 location .getLineNumber (),
312312 location .getPosition (),
313- node .getText ());
313+ node .getVariableName ());
314314 }
315315 if (!startsWithClauseKeyword (fragment )) {
316316 p .setAvailable (true );
@@ -335,7 +335,8 @@ protected Void handleSingleValueNode(
335335 Object value ,
336336 Class <?> valueClass ,
337337 Consumer <Scalar <?, ?>> consumer ) {
338- Supplier <Scalar <?, ?>> supplier = wrap (node .getLocation (), node .getText (), value , valueClass );
338+ Supplier <Scalar <?, ?>> supplier =
339+ wrap (node .getLocation (), node .getVariableName (), value , valueClass );
339340 consumer .accept (supplier .get ());
340341 return null ;
341342 }
@@ -355,10 +356,11 @@ protected void handleIterableValueNode(
355356 location .getSql (),
356357 location .getLineNumber (),
357358 location .getPosition (),
358- node .getText (),
359+ node .getVariableName (),
359360 index );
360361 }
361- Supplier <Scalar <?, ?>> supplier = wrap (node .getLocation (), node .getText (), v , v .getClass ());
362+ Supplier <Scalar <?, ?>> supplier =
363+ wrap (node .getLocation (), node .getVariableName (), v , v .getClass ());
362364 consumer .accept (supplier .get ());
363365 p .appendRawSql (", " );
364366 p .appendFormattedSql (", " );
0 commit comments