Function and Literal expressions can be non-deterministic but in most cases they are safe, and giving them proper toString()'s will help caching quite a bit.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
package com.samskivert.depot.expression;
|
||||
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.samskivert.depot.PersistentRecord;
|
||||
@@ -63,6 +65,11 @@ public class FunctionExp implements SQLExpression
|
||||
return _arguments;
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return _function + "(" + StringUtil.join(_arguments, ", ") + ")";
|
||||
}
|
||||
|
||||
/** The literal name of this function, e.g. FLOOR */
|
||||
protected String _function;
|
||||
|
||||
|
||||
@@ -53,6 +53,11 @@ public class LiteralExp
|
||||
return _text;
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return _text;
|
||||
}
|
||||
|
||||
/** The literal text of this expression, e.g. COUNT(*) */
|
||||
protected String _text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user