public class Nil
extends java.lang.Object
Types
.
Date d1 = new Date(), d2 = null; ServiceLocator.getStore().executeStatement( "update t set d1=?, d2=? where oid = ?", new Object[]{Nil.wrap(d1, Types.TIMESTAMP), Nil.wrap(d2,Types.TIMESTAMP), oid});Can be used in value lists of inserts and in "set column = value" assignments of update statements. Note that usage for parameters in the where clause is not advisable since this will not yield the intended results because of the three valued logic in SQL (see
NullExpression
for this).Modifier and Type | Method and Description |
---|---|
int |
getSqltype() |
java.lang.Object |
getValue() |
static Nil |
wrap(java.lang.Object value,
int sqltype)
Wrap up a value and an appropriate sqltype (from
Types ) |
public java.lang.Object getValue()
public int getSqltype()
public static Nil wrap(java.lang.Object value, int sqltype)
Types
)value
- the value to be wrapped (can be null)sqltype
- the type to use, if the value is null@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.