public void moveToInsertRow() throws SQLException { isUpdatable(); if (!oninsrow) { oninsrow = true; rowbuf = new String[tr.nrows]; } }
public void updateTimestamp(int colIndex, java.sql.Timestamp t) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = t.toString(); }
public void updateShort(int colIndex, short b) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = Short.toString(b); }
public void updateLong(int colIndex, long b) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = Long.toString(b); }
public void updateNull(int colIndex) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = null; }
public void updateInt(int colIndex, int b) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = Integer.toString(b); }
public void updateFloat(int colIndex, float f) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = Float.toString(f); }
public void updateDouble(int colIndex, double f) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = Double.toString(f); }
public void updateString(int colIndex, String s) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = s; }
public void updateDate(int colIndex, java.sql.Date d) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = d.toString(); }
public void updateTime(int colIndex, java.sql.Time t) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = t.toString(); }
public void deleteRow() throws SQLException { isUpdatable(); if (oninsrow) { throw new SQLException("cursor on insert row"); } if (updatable < UPD_INSUPDDEL) { throw new SQLException("no primary key on table defined"); } fillRowbuf(); StringBuffer sb = new StringBuffer(); sb.append("DELETE FROM "); sb.append(SQLite.Shell.sql_quote_dbl(uptable)); sb.append(" WHERE "); String args[] = new String[pkcols.length]; for (int i = 0; i < pkcols.length; i++) { sb.append(SQLite.Shell.sql_quote_dbl(pkcols[i])); sb.append(" = " + (nullrepl ? "'%q'" : "%Q")); if (i < pkcols.length - 1) { sb.append(" AND "); } args[i] = rowbuf[pkcoli[i]]; } try { this.s.conn.db.exec(sb.toString(), null, args); } catch (SQLite.Exception e) { throw new SQLException(e.getMessage()); } rowbuf = null; }
public void updateBytes(int colIndex, byte[] s) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); if (this.s.conn.db.is3()) { rowbuf[colIndex - 1] = SQLite.StringEncoder.encodeX(s); } else { rowbuf[colIndex - 1] = SQLite.StringEncoder.encode(s); } }
public void refreshRow() throws SQLException { isUpdatable(); if (oninsrow) { throw new SQLException("cursor on insert row");
public void updateRow() throws SQLException { isUpdatable(); if (rowbuf == null) { throw new SQLException("no update data provided");
public void insertRow() throws SQLException { isUpdatable(); if (!oninsrow || rowbuf == null) { throw new SQLException("no insert data provided");
public void updateString(int colIndex, String s) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = s; }
public void updateString(int colIndex, String s) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = s; }
public void updateLong(int colIndex, long b) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); rowbuf[colIndex - 1] = Long.toString(b); }
public void updateBytes(int colIndex, byte[] s) throws SQLException { isUpdatable(); if (tr == null || colIndex < 1 || colIndex > tr.ncolumns) { throw new SQLException("column " + colIndex + " not found"); } fillRowbuf(); if (this.s.conn.db.is3()) { rowbuf[colIndex - 1] = SQLite.StringEncoder.encodeX(s); } else { rowbuf[colIndex - 1] = SQLite.StringEncoder.encode(s); } }