Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Breaking code changes in 2.1.0 #5750

Closed
Closed
@mipastgt

Description

@mipastgt

SQLDelight Version

2.1.0

Operating System

macOS

Gradle Version

8.12

Kotlin Version

2.1.21

Dialect

SQLite

AGP Version

8.9.3

Describe the Bug

Although it is not mentioned in the release notes this release contains breaking code changes.
Code like this does not compile anymore:

    var primaryDevice: PrimaryDevice
        set(value) = queries.insertOrReplaceProperty(PRIMARY_DEVICE_KEY, value.toString())
Return type mismatch: expected 'Unit', actual 'QueryResult<Long>'.

The reason is that the generated insertOrReplaceProperty method now returns the row count. See: #4578
To make this compile again you have to change the = to using {}

Stacktrace

Gradle Build Script

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions