Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Make query parameters like "where" an optional parameter to the generated methods #107

@StefanLobbenmeier

Description

@StefanLobbenmeier

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I would like to be able to have more control over the queries that I end up executing without having to manually implement them

Describe the solution you'd like
A clear and concise description of what you want to happen.
For example:

  Future<List<HealthEntryProxy>> getHealthEntryProxiesAll() async {
    var dbClient = await db;
    var result = await dbClient.query(theHealthEntryTableHandler,
        columns: theHealthEntryColumns, where: '1');

    return result.map((e) => HealthEntryProxy.fromMap(e)).toList();
  }

would be something like this

  Future<List<HealthEntryProxy>> getHealthEntryProxiesAll({where: '1', whereArgs: []}) async {
    var dbClient = await db;
    var result = await dbClient.query(theHealthEntryTableHandler,
        columns: theHealthEntryColumns, where: where, whereArgs: whereArgs);

    return result.map((e) => HealthEntryProxy.fromMap(e)).toList();
  }

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
The alternative for me would be manually creating these methods

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions