data

Macro data 

Source
macro_rules! data {
    () => { ... };
    ($($field:ident : $value:expr),* $(,)?) => { ... };
}
Expand description

Macro for concise data creation.

§Examples

use prax_query::data;

// Simple create
let user_data = data! {
    email: "bob@example.com",
    name: "Bob",
    age: 30,
};

// With nested data
let post_data = data! {
    title: "Hello World",
    author: connect!(id: 1),
    tags: ["rust", "orm"],
};

// With optional fields
let update_data = data! {
    name: "Robert",
    bio: null,
    views: increment!(1),
};