org.apithefire.sql.h2
Enum CompatibilityMode

java.lang.Object
  extended by java.lang.Enum<CompatibilityMode>
      extended by org.apithefire.sql.h2.CompatibilityMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CompatibilityMode>

public enum CompatibilityMode
extends java.lang.Enum<CompatibilityMode>

A compatibility mode to other DBMS.

Author:
Chew Boon Aik
See Also:
Compatibility

Enum Constant Summary
HSQLDB
          When converting the scale of decimal data, the number is only converted if the new scale is smaller then current scale.
MYSQL
          When inserting data, if a column is defined to be NOT NULL and NULL is inserted, then a 0 (or empty string, or the current timestamp for timestamp columns) value is used.
POSTGRESQL
          Concatenation of a NULL with another value results in NULL.
 
Method Summary
protected  java.lang.String getParameterValue()
           
static CompatibilityMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CompatibilityMode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

POSTGRESQL

public static final CompatibilityMode POSTGRESQL
Concatenation of a NULL with another value results in NULL. Usually, the NULL is treated as an empty string if only one of the operators is NULL, and NULL is only returned if both values are NULL.


MYSQL

public static final CompatibilityMode MYSQL
When inserting data, if a column is defined to be NOT NULL and NULL is inserted, then a 0 (or empty string, or the current timestamp for timestamp columns) value is used. Usually, this operation is not allowed and an exception is thrown.


HSQLDB

public static final CompatibilityMode HSQLDB
When converting the scale of decimal data, the number is only converted if the new scale is smaller then current scale. Usually, the scale is converted and 0s are added if required.

Method Detail

values

public static final CompatibilityMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(CompatibilityMode c : CompatibilityMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static CompatibilityMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getParameterValue

protected java.lang.String getParameterValue()


Copyright © 2008. All Rights Reserved.