@Override public Void call(final SQLiteStatement statement) throws Exception { statement.bindNull(index); return null; } });
@Override public Void call(final SQLiteStatement statement) throws Exception { statement.bindNull(index); return null; } });
@Override public Object call() throws Exception { SQLiteStatement stmt = stmt(connectionPtr, statementPtr); stmt.bindNull(index); return null; } });
@Override public Object call() throws Exception { SQLiteStatement stmt = stmt(connectionPtr, statementPtr); stmt.bindNull(index); return null; } });
@Override public Void call(final SQLiteStatement statement) throws Exception { statement.bindNull(index); return null; } });
public SQLiteQuery bindNull(int index) throws SQLiteException { this.stmt.bindNull(index); return this; }
public SQLiteQuery bindNull(int index) throws SQLiteException { this.stmt.bindNull(index); return this; }
/** * Binds SQL parameter to a BLOB value, represented by a byte array. * * @param index the index of the boundable parameter, starting with 1 * @param value an array of bytes to be used as the blob value; if null, {@link #bindNull} is called * @return this object * @throws SQLiteException if SQLite returns an error, or if the call violates the contract of this class * @see <a href="http://www.sqlite.org/c3ref/bind_blob.html">sqlite3_bind_blob</a> */ public SQLiteStatement bind(int index, byte[] value) throws SQLiteException { return value == null ? bindNull(index) : bind(index, value, 0, value.length); }
/** * Binds SQL parameter to a NULL value. * * @param name parameter name * @return this object * @throws SQLiteException if SQLite returns an error, * or if parameter with specified name was not found, * or if the call violates the contract of this class * @see <a href="http://www.sqlite.org/c3ref/bind_blob.html">sqlite3_bind_null</a> */ public SQLiteStatement bindNull(String name) throws SQLiteException { return bindNull(getValidBindParameterIndex(name)); }
switch (DBUtils.getTypeOfObject(arg)) { case Cursor.FIELD_TYPE_NULL: stmt.bindNull(i + 1); break; case Cursor.FIELD_TYPE_INTEGER:
/** * Binds SQL parameter to a value of type String. * * @param index the index of the boundable parameter, starting with 1 * @param value String value, if null then {@link #bindNull} will be called * @return this object * @throws SQLiteException if SQLite returns an error, or if the call violates the contract of this class * @see <a href="http://www.sqlite.org/c3ref/bind_blob.html">sqlite3_bind_text</a> */ public SQLiteStatement bind(int index, String value) throws SQLiteException { if (value == null) { Internal.logFine(this, "bind(null string)"); return bindNull(index); } myController.validate(); if (Internal.isFineLogging()) { if (value.length() <= 20) Internal.logFine(this, "bind(" + index + "," + value + ")"); else Internal.logFine(this, "bind(" + index + "," + value.substring(0, 20) + "....)"); } int rc = _SQLiteManual.sqlite3_bind_text(handle(), index, value); myController.throwResult(rc, "bind(String)", this); myHasBindings = true; return this; }
/** * Binds SQL parameter to a BLOB value, represented by a range within byte array. * * @param index the index of the boundable parameter, starting with 1 * @param value an array of bytes; if null, {@link #bindNull} is called * @param offset position in the byte array to start reading value from * @param length number of bytes to read from value * @return this object * @throws SQLiteException if SQLite returns an error, or if the call violates the contract of this class * @see <a href="http://www.sqlite.org/c3ref/bind_blob.html">sqlite3_bind_blob</a> */ public SQLiteStatement bind(int index, byte[] value, int offset, int length) throws SQLiteException { if (value == null) { Internal.logFine(this, "bind(null blob)"); return bindNull(index); } if (offset < 0 || offset + length > value.length) throw new ArrayIndexOutOfBoundsException(value.length + " " + offset + " " + length); myController.validate(); if (Internal.isFineLogging()) { Internal.logFine(this, "bind(" + index + ",[" + length + "])"); } int rc = _SQLiteManual.sqlite3_bind_blob(handle(), index, value, offset, length); myController.throwResult(rc, "bind(blob)", this); myHasBindings = true; return this; }
/** * Binds SQL parameter to a BLOB value, consiting of a given number of zero bytes. * * @param index the index of the boundable parameter, starting with 1 * @param length number of zero bytes to use as a parameter * @return this object * @throws SQLiteException if SQLite returns an error, or if the call violates the contract of this class * @see <a href="http://www.sqlite.org/c3ref/bind_blob.html">sqlite3_bind_zeroblob</a> */ public SQLiteStatement bindZeroBlob(int index, int length) throws SQLiteException { if (length < 0) { Internal.logFine(this, "bind(null zeroblob)"); return bindNull(index); } myController.validate(); if (Internal.isFineLogging()) { Internal.logFine(this, "bindZeroBlob(" + index + "," + length + ")"); } int rc = _SQLiteSwigged.sqlite3_bind_zeroblob(handle(), index, length); myController.throwResult(rc, "bindZeroBlob()", this); myHasBindings = true; return this; }
pS.bindNull(count); } else { switch (field.getType()) {