Skip to content

feat: Expose dbs filtering methods accepting predicate with receiver #73

@ovitrif

Description

@ovitrif

concept: The idea is to have a setup like Kotlin does, for functions like filtering, where one can write thisListOfChannels.filter { it.id == channelIdSavedOutside }.

where: Receiver param (ie. the this param of a function for Rust/ C# and other langs writing this way) is of type of elements in the list.

deliverable: The expected outcome is to be able to filter all values in a sqlite DB by a predicate, without needing to load all records into memory.

uncertainties:

  1. Not sure if possible with current UniFFI stack to accept lambda's, and even more, lambdas with receiver.
  2. Not sure we can filter by anything and have rust (or the crate used by the rust code) translate that to sqlite queries. The whole idea kinda hangs on this.

context: Originating from PR review:

comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions