Code example for SQLiteStatement

Methods: bindLong, bindString, executeInsert

0
     * @param history 
     * @return 
     */ 
    public long insertTimerHistory(final long startedAt, final String desc,
    		final long finishedAt, final long duration, final String history) {
    	insertStmt.bindLong   (1, startedAt);
    	insertStmt.bindString (2, desc);
    	insertStmt.bindLong   (3, finishedAt);
    	insertStmt.bindLong   (4, duration);
    	insertStmt.bindString (5, history);
    	 
        return insertStmt.executeInsert();
    } 
     
     
    /** 
     * Updates a pre-existing timer history record with new information 
     * @param record 
     */ 
    public void updateTimerHistory(TimerHistoryDbRecord record) {
    	updateStmt.bindLong   (1, record.getStartedAt());