- public void insertInto(SQLiteDatabase db) {
- fillDataHash();
- db.execSQL("INSERT INTO transactions(id, date, description, data_hash) values(?,?,?,?)",
- new Object[]{id, date, description, dataHash});
-
- for (LedgerTransactionItem item : items) {
- db.execSQL("INSERT INTO transaction_accounts(transaction_id, account_name, amount, " +
- "currency) values(?, ?, ?, ?)",
- new Object[]{id, item.getAccountName(), item.getAmount(), item.getCurrency()});
- }
- }
- private void fillDataHash() {