Skip to content

diesel: ad-hoc queryable structure generation #2

@CertainLach

Description

@CertainLach

Currently, immigrant-diesel can only generate structure to select all rows from the table.

Adding ability to specify multiple sets of query fields on schema level is infeasible and will not make this easier to use.

But what about generating a macros, which then can generate queryable struct for the given subset of fields?

from_row!(AdHocData = MyTable(field1, field2))
=>
#[diesel(table = "db_my_table")]
struct AdHocData {
   field1: ...
   field2: ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    dieselimmigrant-diesel relatedenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions