Skip to content

Instantly share code, notes, and snippets.

@galex
Created March 31, 2022 13:56
Show Gist options
  • Save galex/67224490f93f13fd700fb5a803275814 to your computer and use it in GitHub Desktop.
Save galex/67224490f93f13fd700fb5a803275814 to your computer and use it in GitHub Desktop.
Extensions for SQLDelight
fun DeviceQueries.saveDevice(device: Device) = insertOrUpdate(
identifier = device.identifier,
appIdentifier = device.appIdentifier,
versionCode = device.versionCode,
versionName = device.versionName,
devicePlatform = device.devicePlatform,
deviceModel = device.deviceModel,
deviceManufacturer = device.deviceManufacturer,
connected = device.connected,
foreground = device.foreground,
favorite = device.favorite,
expanded = device.expanded,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment