public class FunctionsMySQL extends Function
ABS, ACOS, ADD_MONTHS, args, ARRAY_APPEND, ARRAY_CONCAT, ARRAY_CONTAINS, ARRAY_GET, ARRAY_LENGTH, ARRAY_SLICE, ASCII, ASIN, ATAN, ATAN2, AUTOCOMMIT, BIT_LENGTH, BITAND, BITGET, BITOR, BITXOR, CANCEL_SESSION, CASE, CASEWHEN, CAST, CEILING, CENTURY, CHAR, CHAR_LENGTH, COALESCE, COMPRESS, CONCAT, CONCAT_WS, CONVERT, COS, COSH, COT, CSVREAD, CSVWRITE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURRVAL, DATABASE, DATABASE_PATH, DATE_ADD, DATE_DIFF, DATE_TRUNC, DAY_NAME, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, DECADE, DECODE, DECRYPT, DEGREES, DIFFERENCE, DISK_SPACE_USED, DOW, ENCRYPT, EPOCH, ESTIMATED_ENVELOPE, EXP, EXPAND, EXTRACT, FILE_READ, FILE_WRITE, FLOOR, FORMATDATETIME, GREATEST, H2VERSION, HASH, HEXTORAW, HOUR, IDENTITY, IFNULL, info, INSERT, INSTR, ISO_DAY_OF_WEEK, ISO_WEEK, ISO_YEAR, LCASE, LEAST, LEFT, LENGTH, LINK_SCHEMA, LN, LOCALTIME, LOCALTIMESTAMP, LOCATE, LOCK_MODE, LOCK_TIMEOUT, LOG, LOG10, LOWER, LPAD, LTRIM, MEMORY_FREE, MEMORY_USED, MICROSECOND, MILLENNIUM, MILLISECOND, MINUTE, MOD, MONTH, MONTH_NAME, NANOSECOND, NEXTVAL, NULLIF, NVL2, OCTET_LENGTH, ORA_HASH, PARSEDATETIME, PI, POSITION, POWER, QUARTER, RADIANS, RAND, RANDOM_UUID, RAWTOHEX, READONLY, REGEXP_LIKE, REGEXP_REPLACE, REPEAT, REPLACE, RIGHT, ROUND, ROUNDMAGIC, RPAD, RTRIM, SCHEMA, SCOPE_IDENTITY, SECOND, SECURE_RAND, SESSION_ID, SET, SIGN, SIGNAL, SIN, SINH, SOUNDEX, SPACE, SQRT, STRINGDECODE, STRINGENCODE, STRINGTOUTF8, SUBSTR, SUBSTRING, TABLE, TABLE_DISTINCT, TAN, TANH, TIMEZONE_HOUR, TIMEZONE_MINUTE, TO_CHAR, TO_DATE, TO_TIMESTAMP, TO_TIMESTAMP_TZ, TRANSACTION_ID, TRANSLATE, TRIM, TRUNCATE, TRUNCATE_VALUE, type, UCASE, UNNEST, UPPER, USER, UTF8TOSTRING, VALUES, VAR_ARGS, WEEK, XMLATTR, XMLCDATA, XMLCOMMENT, XMLNODE, XMLSTARTDOC, XMLTEXT, YEAR, ZEROMAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL| Modifier and Type | Method and Description |
|---|---|
protected void |
checkParameterCount(int len)
Check if the parameter count is correct.
|
static java.lang.String |
fromUnixTime(int seconds)
See
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_from-unixtime
|
static java.lang.String |
fromUnixTime(int seconds,
java.lang.String format)
See
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_from-unixtime
|
static Function |
getFunction(Database database,
java.lang.String upperName)
Returns mode-specific function for a given name, or
null. |
protected Value |
getValueWithArgs(Session session,
Expression[] args)
Return the resulting value for the given expression arguments.
|
Expression |
optimize(Session session)
Try to optimize the expression.
|
static int |
unixTimestamp()
Get the seconds since 1970-01-01 00:00:00 UTC.
|
static int |
unixTimestamp(java.sql.Timestamp timestamp)
Get the seconds since 1970-01-01 00:00:00 UTC of the given timestamp.
|
doneWithParameters, getArgs, getCost, getFunctionInfo, getFunctionType, getName, getNullOrValue, getSQL, getSubexpression, getSubexpressionCount, getType, getValue, getValueForColumnList, getValueType, isBufferResultSetToLocalTemp, isDeterministic, isEverything, isGeneratedKey, mapColumns, setDataType, setEvaluatable, setParameter, updateAggregateaddFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getExpressionColumns, getExpressionColumns, getExpressionColumns, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getSQL, getTableAlias, getTableName, getUnenclosedSQL, isAutoIncrement, isConstant, isValueSet, toString, writeExpressions, writeExpressionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSQLpublic static int unixTimestamp()
public static int unixTimestamp(java.sql.Timestamp timestamp)
timestamp - the timestamppublic static java.lang.String fromUnixTime(int seconds)
seconds - The current timestamp in seconds.public static java.lang.String fromUnixTime(int seconds,
java.lang.String format)
seconds - The current timestamp in seconds.format - The format of the date/time String to return.public static Function getFunction(Database database, java.lang.String upperName)
null.database - the databaseupperName - the upper-case name of a functionnullprotected void checkParameterCount(int len)
FunctioncheckParameterCount in class Functionlen - the number of parameters setpublic Expression optimize(Session session)
Expressionoptimize in interface FunctionCalloptimize in class Functionsession - the sessionprotected Value getValueWithArgs(Session session, Expression[] args)
FunctiongetValueWithArgs in class Functionsession - the sessionargs - argument expressions