| Crates.io | diesel_cockroach |
| lib.rs | diesel_cockroach |
| version | 0.1.1 |
| created_at | 2020-10-22 16:56:15.771649+00 |
| updated_at | 2020-11-12 15:35:42.675072+00 |
| description | Additional Diesel ORM support for CockroachDB syntax. |
| homepage | https://github.com/tommilligan/diesel_cockroach |
| repository | |
| max_upload_size | |
| id | 304375 |
| size | 11,099 |
Additional Diesel ORM support for CockroachDB syntax.
cargo install diesel_cockroach
Currently supported features are listed below:
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);