com.trolltech.qt.sql
Enum QSql.NumericalPrecisionPolicy

java.lang.Object
  extended by java.lang.Enum<QSql.NumericalPrecisionPolicy>
      extended by com.trolltech.qt.sql.QSql.NumericalPrecisionPolicy
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QSql.NumericalPrecisionPolicy>
Enclosing interface:
QSql

public static enum QSql.NumericalPrecisionPolicy
extends java.lang.Enum<QSql.NumericalPrecisionPolicy>
implements QtEnumerator

This enum type describes at which precision levels numercial values are read from a database.

Some databases support numerical values with a precision that is not storable in a C++ basic data type. The default behavior is to bind these values as a QString. This enum can be used to override this behavior.

Note: The actual behaviour if an overflow occurs is driver specific. The Oracle database just returns an error in this case.


Enum Constant Summary
HighPrecision
          The default behavior - try to preserve maximum precision.
LowPrecisionDouble
          Force double values.
LowPrecisionInt32
          Force 32bit integer values.
LowPrecisionInt64
          Force 64bit integer values.
 
Method Summary
static QSql.NumericalPrecisionPolicy resolve(int value)
           
 int value()
           
static QSql.NumericalPrecisionPolicy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QSql.NumericalPrecisionPolicy[] 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

LowPrecisionInt32

public static final QSql.NumericalPrecisionPolicy LowPrecisionInt32

Force 32bit integer values. In case of floating point numbers, the fractional part is silently discarded.


LowPrecisionInt64

public static final QSql.NumericalPrecisionPolicy LowPrecisionInt64

Force 64bit integer values. In case of floating point numbers, the fractional part is silently discarded.


LowPrecisionDouble

public static final QSql.NumericalPrecisionPolicy LowPrecisionDouble

Force double values.


HighPrecision

public static final QSql.NumericalPrecisionPolicy HighPrecision

The default behavior - try to preserve maximum precision.

Method Detail

values

public static final QSql.NumericalPrecisionPolicy[] 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(QSql.NumericalPrecisionPolicy c : QSql.NumericalPrecisionPolicy.values())
        System.out.println(c);

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

valueOf

public static QSql.NumericalPrecisionPolicy 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

value

public int value()
Specified by:
value in interface QtEnumerator

resolve

public static QSql.NumericalPrecisionPolicy resolve(int value)