3 releases (breaking)

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

#2424 in Database interfaces

Download history 10/week @ 2024-02-15 30/week @ 2024-02-22 7/week @ 2024-02-29 13/week @ 2024-03-07 44/week @ 2024-03-14 7/week @ 2024-03-21 42/week @ 2024-03-28 38/week @ 2024-04-04

89 downloads per month

MIT license

8KB
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

~2.5–8MB
~149K SLoC