[−][src]Macro noria::row
Create a new row for insertion into a Table
using column names.
If the schema of the given table is known, column defaults and NOT NULL
restrictions will
also be respected. In the future, this method will also check that the provided DataType
matches the expected data type for each column.
Values are automatically converted to DataType
as necessary.
async fn add_user(users: &mut noria::Table) -> Result<(), noria::error::TableError> { let user = noria::row!(users, "username" => "jonhoo", "password" => "hunter2", "created_at" => chrono::Local::now().naive_local(), "logins" => 0, ); users.insert(user).await }