jxDBCon 0.9z

org.sourceforge.jxdbcon
Class EscapeFuncs

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.EscapeFuncs
Direct Known Subclasses:
PGEscapeFuncs

public class EscapeFuncs
extends Object

This class groups the default implementations of the JDBC scalar functions.

Version:
$Revision: 1.7 $, $Date: 2002/05/07 21:42:38 $
Author:
Keve Müller

Nested Class Summary
static class EscapeFuncs.abs
          ABS(number) Absolute value of number.
static class EscapeFuncs.acos
          ACOS(float) Arccosine, in radians, of float.
static class EscapeFuncs.ascii
          ASCII(string) Integer representing the ASCII code value of the leftmost character in string.
static class EscapeFuncs.asin
          ASIN(float) Arcsine, in radians, of float.
static class EscapeFuncs.atan
          ATAN(float) Arctangent, in radians, of float.
static class EscapeFuncs.atan2
          ATAN2(float1, float2) Arctangent, in radians, of float2 / float1.
static class EscapeFuncs.cast
          CAST(any, typename) Cast a value to a given type.
static class EscapeFuncs.ceiling
          CEILING(number) Smallest integer >= number.
static class EscapeFuncs.charcode
          CHAR(code) Character with ASCII code value code, where code is between 0 and 255
static class EscapeFuncs.concat
          CONCAT(string1, string2) Character string formed by appending string2 to string1; if a string is null, the result is DBMS-dependent.
static class EscapeFuncs.convert
          CONVERT(value, SQLtype) value converted to SQLtype.
static class EscapeFuncs.cos
          COS(float) Cosine of float radians.
static class EscapeFuncs.cot
          COT(float) Cotangent of float radians.
static class EscapeFuncs.curdate
          CURDATE() The current date as a date value.
static class EscapeFuncs.curtime
          CURTIME() The current local time as a time value.
static class EscapeFuncs.database
          DATABASE() Name of the database.
static class EscapeFuncs.dayname
          DAYNAME(date) A character string representing the day component of date; the name for the day is specific to the data source.
static class EscapeFuncs.dayofmonth
          DAYOFMONTH(date) An integer from 1 to 31 representing the day of the month in date.
static class EscapeFuncs.dayofweek
          DAYOFWEEK(date) An integer from 1 to 7 representing the day of the week in date; 1 represents Sunday.
static class EscapeFuncs.dayofyear
          DAYOFYEAR(date) An integer from 1 to 366 representing the day of the year in date.
static class EscapeFuncs.degrees
          DEGREES(number) Degrees in number radians.
static class EscapeFuncs.difference
          DIFFERENCE(string1, string2) Integer indicating the difference between the values returned by the function SOUNDEX for string1 and string2.
static class EscapeFuncs.exp
          EXP(float) Exponential function of float.
static class EscapeFuncs.floor
          FLOOR(number) Largest integer <= number.
static class EscapeFuncs.hour
          HOUR(time) An integer from 0 to 23 representing the hour component of time.
static class EscapeFuncs.ifnull
          IFNULL(expression, value) value if expression is null; expression if expression is not null.
static class EscapeFuncs.insert
          INSERT(string1, start, length, string2) A character string formed by deleting length characters from string1 beginning at start, and inserting string2 into string1 at start.
static class EscapeFuncs.lcase
          LCASE(string) Converts all uppercase characters in string to lowercase.
static class EscapeFuncs.left
          LEFT(string, count) The count leftmost characters from string.
static class EscapeFuncs.length
          LENGTH(string) Number of characters in string, excluding trailing blanks.
static class EscapeFuncs.locate
          LOCATE(string1, string2[, start]) Position in string2 of the first occurrence of string1, searching from the beginning of string2; if start is specified, the search begins from position start.
static class EscapeFuncs.log
          LOG(float) Base e logarithm of float.
static class EscapeFuncs.log10
          LOG10(float) Base 10 logarithm of float.
static class EscapeFuncs.ltrim
          LTRIM(string) Characters of string with leading blank spaces removed.
static class EscapeFuncs.minute
          MINUTE(time) An integer from 0 to 59 representing the minute component of time.
static class EscapeFuncs.mod
          MOD(integer1, integer2) Remainder for integer1 / integer2.
static class EscapeFuncs.month
          MONTH(date) An integer from 1 to 12 representing the month component of date.
static class EscapeFuncs.monthname
          MONTHNAME(date) A character string representing the month component of date; the name for the month is specific to the data source.
(package private) static class EscapeFuncs.NoFunction
           
static class EscapeFuncs.now
          NOW() A timestamp value representing the current date and time.
(package private) static class EscapeFuncs.OneParamFunction
           
static class EscapeFuncs.pi
          PI() The constant pi.
static class EscapeFuncs.power
          POWER(number, power) number raised to (integer) power.
static class EscapeFuncs.quarter
          QUARTER(date) An integer from 1 to 4 representing the quarter in date; 1 represents January 1 through March 31.
static class EscapeFuncs.radians
          RADIANS(number) Radians in number degrees.
static class EscapeFuncs.rand
          RAND(integer) Random floating point for seed integer.
static class EscapeFuncs.repeat
          REPEAT(string, count) A character string formed by repeating string count times.
static class EscapeFuncs.replace
          REPLACE(string1, string2, string3) Replaces all occurrences of string2 in string1 with string3
static class EscapeFuncs.right
          RIGHT(string, count) The count rightmost characters in string.
static class EscapeFuncs.round
          ROUND(number, places) number rounded to places places.
static class EscapeFuncs.rtrim
          RTRIM(string) The characters of string with no trailing blanks.
static class EscapeFuncs.second
          SECOND(time) An integer from 0 to 59 representing the second component of time.
static class EscapeFuncs.sign
          SIGN(number) -1 to indicate number is < 0; 0 to indicate number is = 0; 1 to indicate number is > 0.
static class EscapeFuncs.sin
          SIN(float) Sine of float radians.
static class EscapeFuncs.soundex
          SOUNDEX(string) A character string, which is data source-dependent, representing the sound of the words in string; this could be a four-digit SOUNDEX code, a phonetic representation of each word, etc.
static class EscapeFuncs.space
          SPACE(count) A character string consisting of count spaces
static class EscapeFuncs.sqrt
          SQRT(float) Square root of float.
static class EscapeFuncs.substring
          SUBSTRING(string, start, length) A character string formed by extracting length characters from string beginning at start.
static class EscapeFuncs.tan
          TAN(float) Tangent of float radians.
static class EscapeFuncs.timestampadd
          TIMESTAMPADD(interval, count, timestamp) A timestamp calculated by adding count number of interval(s) to timestamp.
static class EscapeFuncs.timestampdiff
          TIMESTAMPDIFF(interval, timestamp1, timestamp2) An integer representing the number of interval by which timestamp2 is greater than timestamp1.
static class EscapeFuncs.truncate
          TRUNCATE(number, places) number truncated to places places.
static class EscapeFuncs.ucase
          UCASE(string) Converts all lowercase characters in string to uppercase.
static class EscapeFuncs.user
          USER() User name in the DBMS.
static class EscapeFuncs.week
          WEEK(date) An integer from 1 to 53 representing the week of the year in date.
static class EscapeFuncs.year
          YEAR(date) An integer representing the year component of date.
 
Field Summary
static Map funcMap
           
(package private) static int[] noParam
           
(package private) static int[] oneDate
           
(package private) static int[] oneNumeric
           
(package private) static int[] oneString
           
(package private) static int[] oneTime
           
(package private) static int[] twoNumeric
           
(package private) static int[] twoString
           
 
Constructor Summary
EscapeFuncs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

funcMap

public static final Map funcMap

noParam

static final int[] noParam

oneDate

static final int[] oneDate

oneNumeric

static final int[] oneNumeric

oneString

static final int[] oneString

oneTime

static final int[] oneTime

twoNumeric

static final int[] twoNumeric

twoString

static final int[] twoString
Constructor Detail

EscapeFuncs

public EscapeFuncs()

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.