package uk.gov.register.db;

import org.skife.jdbi.v2.sqlobject.*;
import uk.gov.register.core.Entry;

public interface EntryDAO {
    @SqlBatch("insert into entry(entry_number, sha256hex, timestamp) values(:entryNumber, :sha256hex, :timestampAsLong)")
    void insertInBatch(@BindBean Iterable<Entry> entries);

    @SqlQuery("select value from current_entry_number")
    int currentEntryNumber();

    @SqlUpdate("update current_entry_number set value=:entryNumber")
    void setEntryNumber(@Bind("entryNumber") int currentEntryNumber);
}

@@ -191,16 +191,26 @@
 imestamp
+, item_key
 ) values
@@ -252,16 +252,26 @@
 mpAsLong
+, :itemKey
 )%22)%0A    

Add item key to query inserting values in entry table