3 releases (breaking)

0.3.0 Feb 19, 2019
0.2.0 Feb 13, 2019
0.1.0 Feb 8, 2019

#519 in Database interfaces

Download history 8/week @ 2020-12-24 9/week @ 2020-12-31 59/week @ 2021-01-07 40/week @ 2021-01-14 53/week @ 2021-01-21 51/week @ 2021-01-28 100/week @ 2021-02-04 49/week @ 2021-02-11 53/week @ 2021-02-18 42/week @ 2021-02-25 45/week @ 2021-03-04 33/week @ 2021-03-11 28/week @ 2021-03-18 47/week @ 2021-03-25 26/week @ 2021-04-01 55/week @ 2021-04-08

180 downloads per month

MIT license

7KB
149 lines

diesel-citext  

Diesel support for Postgres citext Extension

Example usage:

This very small extension allows you to use the citext type with diesel, without having to make modifications to the schema.rs generated file. It takes much inspiration from diesel-postgis.

Before sending to postgres and after parsing from postgres, the text content is always passed through the Rust String to_lowercase method.

To Ensure citext in the schema.rs file is parsed correctly, add diesel_citext to the import types declaration in your diesel.toml file.

E.g. it will look like this:

[print_schema]
file = "src/schema.rs"

import_types = ["diesel::sql_types::*", "diesel_citext::sql_types::*"]

lib.rs:

Diesel support for Postgres citext Extension

Dependencies

~1.8–5.5MB
~112K SLoC