{
throw new NucleusException(LOCALISER.msg("060003", "indexOf", "StringExpression", 1,
"NumericExpression"));
}
// Add 1 to the passed in value so that it is of origin 1 to be compatible with CHARINDEX
funcArgs.add(new NumericExpression(fromExpr, Expression.OP_ADD, one));
}
// Subtract 1 from the result of CHARINDEX to be consistent with Java strings
NumericExpression locateExpr = new NumericExpression(stmt, getMappingForClass(int.class), "CHARINDEX", funcArgs);
return new NumericExpression(locateExpr, Expression.OP_SUB, one).encloseInParentheses();
}
}