New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG `ilike` does not support Nullable<Text> #1834

Closed
carlosdp opened this Issue Sep 4, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@carlosdp
Contributor

carlosdp commented Sep 4, 2018

Setup

Versions

  • Rust: 1.28.0 stable
  • Diesel: 1.2.2
  • Database: Postgres
  • Operating System Mac OS

Feature Flags

  • diesel: postgres

Problem Description

PG ilike does not support Nullable

What are you trying to accomplish?

Use ilike text expression method on a nullable text field

What is the expected output?

It compiles

What is the actual output?

ilike is not implemented for Nullable<Text>

Are you seeing any additional errors?

No

Steps to reproduce

pub struct User {
  pub name: Option<String>,
}
...
users::table.filter(name.ilike("%test%")).get_result<User>()?;

Checklist

  • I have already looked over the issue tracker for similar issues.
  • This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment