Skip to content

Commit a82014e

Browse files
Updated calls to sqlite's query which had more than one additional argument per sparklemotion/sqlite3-ruby#527.
1 parent ea799e0 commit a82014e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AppleNoteStore.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def add_plain_text_to_database
254254
@database.execute("UPDATE ZICNOTEDATA " +
255255
"SET ZPLAINTEXT=?, ZDECOMPRESSEDDATA=? " +
256256
"WHERE Z_PK=?",
257-
note.plaintext, note.decompressed_data, note.primary_key) if note.plaintext
257+
[note.plaintext, note.decompressed_data, note.primary_key]) if note.plaintext
258258
end
259259
end
260260

@@ -675,7 +675,7 @@ def rip_notes()
675675
"WHERE ZICNOTEDATA.ZDATA NOT NULL AND ZICCLOUDSYNCINGOBJECT.Z_PK=ZICNOTEDATA.ZNOTE AND " +
676676
"ZICCLOUDSYNCINGOBJECT.ZMODIFICATIONDATE1 >= ? AND " +
677677
"ZICCLOUDSYNCINGOBJECT.ZMODIFICATIONDATE1 <= ?"
678-
@database.execute(tmp_query, range_start_core, range_end_core) do |row|
678+
@database.execute(tmp_query, [range_start_core, range_end_core]) do |row|
679679
begin
680680
self.rip_note(row["ZNOTE"])
681681
rescue StandardError => error

0 commit comments

Comments
 (0)