Code example for SQLiteStatement

Methods: bindLong, bindString, execute

0
    /** 
     * Updates a pre-existing timer history record with new information 
     * @param record 
     */ 
    public void updateTimerHistory(TimerHistoryDbRecord record) {
    	updateStmt.bindLong   (1, record.getStartedAt());
    	updateStmt.bindString (2, record.getDesc());
    	updateStmt.bindLong   (3, record.getFinishedAt());
    	updateStmt.bindLong   (4, record.getDuration());
    	updateStmt.bindString (5, record.getHistory());
    	updateStmt.bindLong   (6, record.getStartedAt());
    	updateStmt.execute();
    } 
     
     
    /** 
     * Deletes a specific record from the timer history table 
     * @param id 
     */ 
    public void deleteTimerHistoryById(final int id) {
    	deleteStmt.bindLong(1, id);