Codota Logo
AbstractJdbc2Statement.setNull
Code IndexAdd Codota to your IDE (free)

How to use
setNull
method
in
org.postgresql.jdbc2.AbstractJdbc2Statement

Best Java code snippets using org.postgresql.jdbc2.AbstractJdbc2Statement.setNull (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

public void setNull(int parameterIndex, int sqlType) throws SQLException
{
  if (sqlType == Types.BOOLEAN)
  {
    sqlType = Types.BIT;
  }
  super.setNull(parameterIndex, sqlType);
}
origin: postgresql/postgresql

public void setNull(int i, int t, String s) throws SQLException
{
  checkClosed();
  setNull(i, t);
}
origin: postgresql/postgresql

public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
{
  checkClosed();
  if (x == null)
    setNull(parameterIndex, Types.DECIMAL);
  else
    bindLiteral(parameterIndex, x.toString(), Oid.NUMERIC);
}
origin: postgresql/postgresql

public void setTime(int i, Time t, java.util.Calendar cal) throws SQLException
{
  checkClosed();
  if (t == null)
  {
    setNull(i, Types.TIME);
    return;
  }
  if (cal != null)
    cal = (Calendar)cal.clone();
  bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED);
}
origin: postgresql/postgresql

setNull(i, Types.BLOB);
return;
origin: postgresql/postgresql

setNull(parameterIndex, Types.VARCHAR);
return ;
origin: postgresql/postgresql

public void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws SQLException
{
  checkClosed();
  if (d == null)
  {
    setNull(i, Types.DATE);
    return;
  }
  
  if (cal != null)
    cal = (Calendar)cal.clone();
  // We must use UNSPECIFIED here, or inserting a Date-with-timezone into a
  // timestamptz field does an unexpected rotation by the server's TimeZone:
  //
  // We want to interpret 2005/01/01 with calendar +0100 as
  // "local midnight in +0100", but if we go via date it interprets it
  // as local midnight in the server's timezone:
  // template1=# select '2005-01-01+0100'::timestamptz;
  //       timestamptz       
  // ------------------------
  //  2005-01-01 02:00:00+03
  // (1 row)
  // template1=# select '2005-01-01+0100'::date::timestamptz;
  //       timestamptz       
  // ------------------------
  //  2005-01-01 00:00:00+03
  // (1 row)
  bindString(i, connection.getTimestampUtils().toString(cal, d), Oid.UNSPECIFIED);
}
origin: postgresql/postgresql

setNull(i, Types.TIMESTAMP);
return;
origin: postgresql/postgresql

setNull(i, Types.CLOB);
return;
origin: postgresql/postgresql

public void setArray(int i, java.sql.Array x) throws SQLException
{
  checkClosed();
  if (null == x)
  {
    setNull(i, Types.ARRAY);
    return;
  }
  // This only works for Array implementations that return a valid array
  // literal from Array.toString(), such as the implementation we return
  // from ResultSet.getArray(). Eventually we need a proper implementation
  // here that works for any Array implementation.
  // Use a typename that is "_" plus the base type; this matches how the
  // backend looks for array types.
  String typename = "_" + x.getBaseTypeName();
  int oid = connection.getTypeInfo().getPGType(typename);
  if (oid == Oid.UNSPECIFIED)
    throw new PSQLException(GT.tr("Unknown type {0}.", typename), PSQLState.INVALID_PARAMETER_TYPE);
  setString(i, x.toString(), oid);
}
origin: postgresql/postgresql

  setNull(i, Types.VARCHAR);
} else {
  setNull(i, Types.CLOB);
origin: postgresql/postgresql

setNull(parameterIndex, Types.VARBINARY);
return ;
origin: postgresql/postgresql

setNull(parameterIndex, targetSqlType);
return ;
origin: postgresql/postgresql

  setNull(parameterIndex, Types.OTHER);
else if (x instanceof String)
  setString(parameterIndex, (String)x);
origin: postgresql/postgresql

public void setBytes(int parameterIndex, byte[] x) throws SQLException
{
  checkClosed();
  if (null == x)
  {
    setNull(parameterIndex, Types.VARBINARY);
    return ;
  }
  if (connection.haveMinimumCompatibleVersion("7.2"))
  {
    //Version 7.2 supports the bytea datatype for byte arrays
    byte[] copy = new byte[x.length];
    System.arraycopy(x, 0, copy, 0, x.length);
    preparedParameters.setBytea( parameterIndex, copy, 0, x.length);
  }
  else
  {
    //Version 7.1 and earlier support done as LargeObjects
    LargeObjectManager lom = connection.getLargeObjectAPI();
    long oid = lom.createLO();
    LargeObject lob = lom.open(oid);
    lob.write(x);
    lob.close();
    setLong(parameterIndex, oid);
  }
}
origin: org.ancoron.postgresql/org.postgresql

public void setNull(int parameterIndex, int sqlType) throws SQLException
{
  if (sqlType == Types.BOOLEAN)
  {
    sqlType = Types.BIT;
  }
  super.setNull(parameterIndex, sqlType);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public void setNull(int parameterIndex, int sqlType) throws SQLException
{
  if (sqlType == Types.BOOLEAN)
  {
    sqlType = Types.BIT;
  }
  super.setNull(parameterIndex, sqlType);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
{
  checkClosed();
  if (x == null)
    setNull(parameterIndex, Types.DECIMAL);
  else
    bindLiteral(parameterIndex, x.toString(), Oid.NUMERIC);
}
origin: org.ancoron.postgresql/org.postgresql

public void setTime(int i, Time t, java.util.Calendar cal) throws SQLException
{
  checkClosed();
  if (t == null)
  {
    setNull(i, Types.TIME);
    return;
  }
  if (cal != null)
    cal = (Calendar)cal.clone();
  bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public void setTime(int i, Time t, java.util.Calendar cal) throws SQLException
{
  checkClosed();
  if (t == null)
  {
    setNull(i, Types.TIME);
    return;
  }
  if (cal != null)
    cal = (Calendar)cal.clone();
  bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED);
}
org.postgresql.jdbc2AbstractJdbc2StatementsetNull

Popular methods of AbstractJdbc2Statement

  • addWarning
    This adds a warning to the warning chain.
  • bindLiteral
  • bindString
  • checkClosed
  • checkIndex
    helperfunction for the getXXX calls to check isFunction and index == 1
  • clearWarnings
  • close
  • createInternalType
  • createResultSet
  • escapeFunction
    generate sql for escaped functions
  • execute
  • executeWithFlags
  • execute,
  • executeWithFlags,
  • getLastOID,
  • getObject,
  • getResultSet,
  • getUpdateCount,
  • modifyJdbcCall,
  • parseSql,
  • registerOutParameter,
  • replaceProcessing

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now