diesel_cockroach

Crates.iodiesel_cockroach
lib.rsdiesel_cockroach
version0.1.1
sourcesrc
created_at2020-10-22 16:56:15.771649
updated_at2020-11-12 15:35:42.675072
descriptionAdditional Diesel ORM support for CockroachDB syntax.
homepagehttps://github.com/tommilligan/diesel_cockroach
repository
max_upload_size
id304375
size11,099
Tom Milligan (tommilligan)

documentation

README

diesel_cockroach

Crates.io CircleCI branch GitHub

Additional Diesel ORM support for CockroachDB syntax.

Installation

cargo install diesel_cockroach

Feature Support

Currently supported features are listed below:

Usage

See the official insert_into documentation for general examples.

Just replace the diesel::insert_into function with the disired function from diesel_cockroach:

use diesel_cockroach::upsert::upsert_into;

let new_users = vec![
    name.eq("Tess"),
    name.eq("Jim"),
];

let rows_upserted = upsert_into(users)
    .values(&new_users)
    .execute(&connection);

assert_eq!(Ok(2), rows_upserted);
Commit count: 0

cargo fmt