use of org.hibernate.engine.query.spi.ParamLocationRecognizer in project hibernate-orm by hibernate.
the class ParameterParserTest method testSlashStarInCharLiteral.
@Test
public void testSlashStarInCharLiteral() {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer(0);
ParameterParser.parse("select coalesce(i.name, '/*NONE') as itname from Item i where i.intVal=? ", recognizer);
assertEquals(1, recognizer.getOrdinalParameterDescriptionMap().size());
}
use of org.hibernate.engine.query.spi.ParamLocationRecognizer in project hibernate-orm by hibernate.
the class ParameterParserTest method testApostropheInOracleAlias.
@Test
public void testApostropheInOracleAlias() {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer(0);
ParameterParser.parse("SELECT column as \"Table's column\" FROM Table WHERE column <> :param", recognizer);
assertTrue(recognizer.getNamedParameterDescriptionMap().containsKey("param"));
}
use of org.hibernate.engine.query.spi.ParamLocationRecognizer in project hibernate-orm by hibernate.
the class ParameterParserTest method testContractionInComment.
@Test
public void testContractionInComment() {
ParamLocationRecognizer recognizer = new ParamLocationRecognizer(0);
ParameterParser.parse("-- This shouldn't fail the test.\n" + "SELECT column FROM Table WHERE column <> :param", recognizer);
assertTrue(recognizer.getNamedParameterDescriptionMap().containsKey("param"));
}
Aggregations