public static void copyAttachment ( SQLDatabase db , long parentSequence , long newSequence , String filename ) throws SQLException { Cursor c = null ; try { c = db . rawQuery ( SQL_ATTACHMENTS_SELECT , new String [ ] { filename , String . valueOf ( parentSequence ) } ) ; copyCursorValuesToNewSequence ( db , c , newSequence ) ; } finally { DatabaseUtils . closeCursorQuietly ( c ) ; } }
Copy a single attachment for a given revision to a new revision .