|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.mode.FunctionsMySQL
public class FunctionsMySQL
This class implements some MySQL-specific functions.
Constructor Summary | |
---|---|
FunctionsMySQL()
|
Method Summary | |
---|---|
static java.lang.String |
date(java.lang.String dateTime)
See http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date This function is dependent on the exact formatting of the MySQL date/time string. |
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 void |
register(java.sql.Connection conn)
Register the functionality in the database. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FunctionsMySQL()
Method Detail |
---|
public static void register(java.sql.Connection conn) throws java.sql.SQLException
conn
- the connection
java.sql.SQLException
public static int unixTimestamp()
public static int unixTimestamp(java.sql.Timestamp timestamp)
timestamp
- the timestamp
public 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 java.lang.String date(java.lang.String dateTime)
dateTime
- The date/time String from which to extract just the date
part.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |