tommilligan / diesel_cockroach

Additional Diesel ORM support for CockroachDB syntax.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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);

About

Additional Diesel ORM support for CockroachDB syntax.

License:MIT License


Languages

Language:Rust 88.2%Language:Shell 7.6%Language:Makefile 4.2%