Skip to content
Diesel support for citext extension
Branch: master
Clone or download
Pull request Compare This branch is 4 commits behind gregelenbaas:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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 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 file is parsed correctly, add diesel_citext to the import types declaration in your diesel.toml file.

E.g. it will look like this:

file = "src/"

import_types = ["diesel::sql_types::*", "diesel_citext::sql_types::*"]
You can’t perform that action at this time.