Skip to content

Support multiple fields using Queryable trait #5

Description

@JADSN

Is not possible use multiple fields using Queryable trait in a struct.

#[derive(Table)]
struct Task {
    id: u64,
    description: String,
    is_done: bool,
}

#[derive(Queryable)]
struct TaskQuery {
    description: String,
    is_done: bool,
}

let mounted_query = Task::table().query(TaskQuery::queryable()).to_sql();

02

Instead of the wildcard (*) be: SELECT * FROM tasks;, is possible to define the fields in the final query?

Example: SELECT description, is_done FROM tasks;

Excellent approach of this lib, following the concept 'Security by design'.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions