cff4233de6
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>
27 lines
744 B
Kotlin
27 lines
744 B
Kotlin
package com.syncflow.data.db
|
|
|
|
import androidx.room.*
|
|
import com.syncflow.data.db.entities.CloudAccountEntity
|
|
import kotlinx.coroutines.flow.Flow
|
|
|
|
@Dao
|
|
interface CloudAccountDao {
|
|
@Query("SELECT * FROM cloud_accounts ORDER BY displayName")
|
|
fun observeAll(): Flow<List<CloudAccountEntity>>
|
|
|
|
@Query("SELECT * FROM cloud_accounts")
|
|
suspend fun getAll(): List<CloudAccountEntity>
|
|
|
|
@Query("SELECT * FROM cloud_accounts WHERE id = :id")
|
|
suspend fun getById(id: Long): CloudAccountEntity?
|
|
|
|
@Insert(onConflict = OnConflictStrategy.ABORT)
|
|
suspend fun insert(entity: CloudAccountEntity): Long
|
|
|
|
@Update
|
|
suspend fun update(entity: CloudAccountEntity)
|
|
|
|
@Delete
|
|
suspend fun delete(entity: CloudAccountEntity)
|
|
}
|