Initial commit — SyncFlow Android file sync app
Supports WebDAV, SFTP, SFTPGo, Nextcloud, ownCloud, Google Drive, Dropbox, and OneDrive. Credentials encrypted with Android Keystore. Biometric app-lock, conflict resolution, and auto-sync via WorkManager. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.syncflow.data.db
|
||||
|
||||
import androidx.room.*
|
||||
import com.syncflow.data.db.entities.SyncFileStateEntity
|
||||
|
||||
@Dao
|
||||
interface SyncFileStateDao {
|
||||
@Query("SELECT * FROM sync_file_states WHERE syncPairId = :pairId")
|
||||
suspend fun getForPair(pairId: Long): List<SyncFileStateEntity>
|
||||
|
||||
@Query("SELECT * FROM sync_file_states WHERE syncPairId = :pairId AND relativePath = :path")
|
||||
suspend fun get(pairId: Long, path: String): SyncFileStateEntity?
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun upsert(entity: SyncFileStateEntity)
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun upsertAll(entities: List<SyncFileStateEntity>)
|
||||
|
||||
@Query("DELETE FROM sync_file_states WHERE syncPairId = :pairId AND relativePath = :path")
|
||||
suspend fun delete(pairId: Long, path: String)
|
||||
|
||||
@Query("DELETE FROM sync_file_states WHERE syncPairId = :pairId")
|
||||
suspend fun deleteForPair(pairId: Long)
|
||||
}
|
||||
Reference in New Issue
Block a user