SupportSQLiteDatabaseKt

Added in 2.0.0

public final class SupportSQLiteDatabaseKt


Summary

Public methods

static final @NonNull T
<T extends Object> transaction(
    @NonNull <Error class: unknown class> receiver,
    boolean exclusive,
    @ExtensionFunctionType @NonNull Function1<@NonNull <Error class: unknown class>, @NonNull T> body
)

Run body in a transaction marking it as successful if it completes without exception.

Public methods

transaction

public static final @NonNull T <T extends Object> transaction(
    @NonNull <Error class: unknown class> receiver,
    boolean exclusive,
    @ExtensionFunctionType @NonNull Function1<@NonNull <Error class: unknown class>, @NonNull T> body
)

Run body in a transaction marking it as successful if it completes without exception.

Parameters
boolean exclusive

Run in EXCLUSIVE mode when true, IMMEDIATE mode otherwise.

@ExtensionFunctionType @NonNull Function1<@NonNull <Error class: unknown class>, @NonNull T> body

Lambda to be run in the transaction.