Skip to content

Struct update rest pattern syntax support for named bindings #591

Open
@jplatte

Description

@jplatte

As an extension to #199, it would be nice if SQLx supported the following for databases compatible with named bindings:

query!("INSERT INTO foo (id, a, b, c) VALUES (:id, :a, :b, :c)", id=new_id, ..foo)

// shorthand for
query!(
    "INSERT INTO foo (id, a, b, c) VALUES (:id, :a, :b, :c)",
    id=new_id,
    a=foo.a,
    b=foo.b,
    c=foo.c,
)

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