Repository: diesel-rs/diesel
File: diesel/src/expression_methods/global_expression_methods.rs (Rust)

Code before:
use crate::dsl;
use crate::expression::array_comparison::{AsInExpression, In, NotIn};
use crate::expression::grouped::Grouped;
use crate::expression::operators::*;
use crate::expression::{assume_not_null, nullable, AsExpression, Expression};
use crate::sql_types::{SingleValue, SqlType};

/// Methods present on all expressions, except tuples
pub trait ExpressionMethods: Expression + Sized {
    /// Creates a SQL `=` expression.
    ///
    /// Note that this function follows SQL semantics around `None`/`null` values,
    /// so `column.eq(None)` will never match. Use [`column.is_null()`](ExpressionMethods::is_null()) instead.
    ///
    /// # Example
    ///
    /// ```rust
    /// # include!("../doctest_setup.rs");
    /// #
    /// # fn main() {
    /// #     use schema::users::dsl::*;
    /// #     let connection = &mut establish_connection();
    /// let data = users.select(id).filter(name.eq("Sean"));
    /// assert_eq!(Ok(1), data.first(connection));
    /// # }
    /// ```
    ///
    /// Matching against `None` follows SQL semantics:
    /// ```rust
    /// # include!("../doctest_setup.rs");
    /// #
    /// # fn main() {
    /// #     run_test().unwrap();
    /// # }
    /// #
    /// # fn run_test() -> QueryResult<()> {
    /// #     use schema::animals::dsl::*;

Review comment (suggestion):
It might be useful to link the sqlite specific [`IS`](https://docs.diesel.rs/master/diesel/expression_methods/trait.SqliteExpressionMethods.html#method.is) operator and the postgres specific [`IS NOT DISTINCT FROM`](https://docs.diesel.rs/master/diesel/expression_methods/trait.PgExpressionMethods.html#method.is_not_distinct_from) here, as both are more in line with rusts `=` operator.

Code after:
use crate::dsl;
use crate::expression::array_comparison::{AsInExpression, In, NotIn};
use crate::expression::grouped::Grouped;
use crate::expression::operators::*;
use crate::expression::{assume_not_null, nullable, AsExpression, Expression};
use crate::sql_types::{SingleValue, SqlType};

/// Methods present on all expressions, except tuples
pub trait ExpressionMethods: Expression + Sized {
    /// Creates a SQL `=` expression.
    ///
    /// Note that this function follows SQL semantics around `None`/`null` values,
    /// so `eq(None)` will never match. Use [`is_null`](ExpressionMethods::is_null()) instead.
    ///
    ///
    #[cfg_attr(
        any(feature = "sqlite", feature = "postgres"),
        doc = "To get behavior that is more like the Rust `=` operator you can also use the"
    )]
    #[cfg_attr(
        feature = "sqlite",
        doc = "sqlite-specific [`is`](crate::SqliteExpressionMethods::is())"
    )]
    #[cfg_attr(all(feature = "sqlite", feature = "postgres"), doc = "or the")]
    #[cfg_attr(
        feature = "postgres",
        doc = "postgres-specific [`is_not_distinct_from`](crate::PgExpressionMethods::is_not_distinct_from())"
    )]
    #[cfg_attr(any(feature = "sqlite", feature = "postgres"), doc = ".")]
    ///
    /// # Example
    ///
    /// ```rust
    /// # include!("../doctest_setup.rs");
    /// #
    /// # fn main() {
    /// #     use schema::users::dsl::*;