use of org.seasar.doma.internal.jdbc.sql.node.SqlLocation in project doma by domaframework.
the class SqlValidator method visitValueNode.
private Void visitValueNode(ValueNode node, Void p) {
SqlLocation location = node.getLocation();
String variableName = node.getVariableName();
TypeDeclaration typeDeclaration = validateExpressionVariable(location, variableName);
if (node.getWordNode() != null) {
if (!typeDeclaration.isScalarType()) {
String sql = getSql(location);
throw new AptException(Message.DOMA4153, methodElement, new Object[] { path, sql, location.getLineNumber(), location.getPosition(), variableName, typeDeclaration.getBinaryName() });
}
} else {
if (!typeDeclaration.isScalarIterableType() && !typeDeclaration.isScalarArrayType()) {
String sql = getSql(location);
throw new AptException(Message.DOMA4161, methodElement, new Object[] { path, sql, location.getLineNumber(), location.getPosition(), variableName, typeDeclaration.getBinaryName() });
}
}
visitNode(node, p);
return null;
}
Aggregations