Maybe something as simple as
fieldCustom(String field, String expression, Object[] params)
which has the added advantage of working as a Java 5 varargs method. For
cases where types are ambiguous, maybe something like
fieldCustom(String field, String expression, Object[] params, int[]
types)
where you can pass in JDBC type codes for the arguments.
Given that people would be able to use this for arbitrarily complex
expressions, I'm not sure it'd be worth trying to impose any more
structure than that at the API level. Or rather, even if there is
eventually a more structured interface available, having this low-level
one will be good in any event.
-Steve
Geert Bevin wrote:
Hmmm, no that is not possible. It's not difficult at all to implement,
just need to come up with a syntax for it. Look at fieldParameter for
the implementation.
public Update fieldParameter(String field, String alias)
{
if (null == field) throw new
IllegalArgumentException("field can't be null.");
if (0 == field.length()) throw new
IllegalArgumentException("field can't be empty.");
if (null == alias) throw new
IllegalArgumentException("alias can't be null.");
if (0 == alias.length()) throw new
IllegalArgumentException("alias can't be empty.");
clearGenerated();
addFieldParameter(alias);
return _field(field, "?");
}
Any ideas about the syntax you'd like?
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users