From 65fbd4d284d0d62160545006678db690bea9557e Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Fri, 10 Aug 2012 21:12:22 +0200 Subject: [PATCH] [#1657] Reorganise the manual (65 / 154) --- .../src/main/resources/manual-2.5.xml | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/jOOQ-website/src/main/resources/manual-2.5.xml b/jOOQ-website/src/main/resources/manual-2.5.xml index d5aad1c0e7..3007f3df3b 100644 --- a/jOOQ-website/src/main/resources/manual-2.5.xml +++ b/jOOQ-website/src/main/resources/manual-2.5.xml @@ -2229,6 +2229,7 @@ create.select(concat("A", "B", "C"));
  • LOG: Get the logarithm of a value given a base.
  • POWER: Calculate value^exponent.
  • RAD: Transform degrees into radians.
  • +
  • RAND: Get a random number.
  • ROUND: Rounds a value to the nearest integer.
  • SIGN: Get the sign of a value (-1, 0, 1).
  • SIN: Get the sine of a value.
  • @@ -2326,12 +2327,40 @@ create.select(concat("A", "B", "C"));
    Date and time functions - + +

    Date and time functions supported by jOOQ

    +

    + This is a list of date and time functions supported by jOOQ's : +

    + +
      +
    • CURRENT_DATE: Get current date as a DATE object.
    • +
    • CURRENT_TIME: Get current time as a TIME object.
    • +
    • CURRENT_TIMESTAMP: Get current date as a TIMESTAMP object.
    • +
    • DATE_ADD: Add a number of days or an interval to a date.
    • +
    • DATE_DIFF: Get the difference in days between two dates.
    • +
    • TIMESTAMP_ADD: Add a number of days or an interval to a timestamp.
    • +
    • TIMESTAMP_DIFF: Get the difference as an INTERVAL DAY TO SECOND between two dates.
    • +
    + +

    Intervals in jOOQ

    +

    + jOOQ fills a gap opened by JDBC, which neglects an important SQL data type as defined by the SQL standards: INTERVAL types. See the manual's section about for more details. +

    +
    System functions - + +

    System functions supported by jOOQ

    +

    + This is a list of system functions supported by jOOQ's : +

    +
      +
    • CURRENT_USER: Get current user.
    • +
    +
    @@ -3648,6 +3677,39 @@ Query query = error.query();]]>
    Data types + + +
    + INTERVAL data types + +

    Intervals in jOOQ

    +

    + jOOQ fills a gap opened by JDBC, which neglects an important SQL data type as defined by the SQL standards: INTERVAL types. SQL knows two different types of intervals: +

    +
      +
    • YEAR TO MONTH: This interval type models a number of months and years
    • +
    • DAY TO SECOND: This interval type models a number of days, hours, minutes, seconds and milliseconds
    • +
    + +

    + Both interval types ship with a variant of subtypes, such as DAY TO HOUR, HOUR TO SECOND, etc. jOOQ models these types as Java objects extending : (where Number.intValue() corresponds to the absolute number of months) and (where Number.intValue() corresponds to the absolute number of milliseconds) +

    + +

    Interval arithmetic

    +

    + In addition to the documented previously, interval arithmetic is also supported by jOOQ. Essentially, the following operations are supported: +

    +
      +
    • DATETIME - DATETIME => INTERVAL
    • +
    • DATETIME + or - INTERVAL => DATETIME
    • +
    • INTERVAL + DATETIME => DATETIME
    • +
    • INTERVAL + - INTERVAL => INTERVAL
    • +
    • INTERVAL * or / NUMERIC => INTERVAL
    • +
    • NUMERIC * INTERVAL => INTERVAL
    • +
    +
    +
    +