@@ -8,10 +8,10 @@ use super::date_and_time::{AtTimeZone, DateTimeLike};
8
8
use super :: operators:: * ;
9
9
use crate :: dsl;
10
10
use crate :: expression:: grouped:: Grouped ;
11
- use crate :: expression:: operators:: { Asc , Desc } ;
11
+ use crate :: expression:: operators:: { Asc , Concat , Desc , Like , NotLike } ;
12
12
use crate :: expression:: { AsExpression , Expression , IntoSql , TypedExpressionType } ;
13
13
use crate :: pg:: expression:: expression_methods:: private:: BinaryOrNullableBinary ;
14
- use crate :: sql_types:: { Array , Binary , Inet , Integer , Jsonb , SqlType , Text , VarChar } ;
14
+ use crate :: sql_types:: { Array , Inet , Integer , SqlType , Text , VarChar } ;
15
15
use crate :: EscapeExpressionMethods ;
16
16
17
17
/// PostgreSQL specific methods which are present on all expressions.
@@ -253,7 +253,7 @@ pub trait PgArrayExpressionMethods: Expression + Sized {
253
253
/// # Ok(())
254
254
/// # }
255
255
/// ```
256
- fn contains < T > ( self , other : T ) -> dsl:: ArrayContains < Self , T >
256
+ fn contains < T > ( self , other : T ) -> dsl:: Contains < Self , T >
257
257
where
258
258
Self :: SqlType : SqlType ,
259
259
T : AsExpression < Self :: SqlType > ,
@@ -363,7 +363,7 @@ pub trait PgArrayExpressionMethods: Expression + Sized {
363
363
/// # Ok(())
364
364
/// # }
365
365
/// ```
366
- fn index < T > ( self , other : T ) -> dsl:: ArrayIndex < Self , T >
366
+ fn index < T > ( self , other : T ) -> dsl:: Index < Self , T >
367
367
where
368
368
Self :: SqlType : SqlType ,
369
369
T : AsExpression < Integer > ,
@@ -409,12 +409,12 @@ pub trait PgArrayExpressionMethods: Expression + Sized {
409
409
/// # Ok(())
410
410
/// # }
411
411
///
412
- fn concat < T > ( self , other : T ) -> dsl:: ConcatArray < Self , T >
412
+ fn concat < T > ( self , other : T ) -> dsl:: Concat < Self , T >
413
413
where
414
414
Self :: SqlType : SqlType ,
415
415
T : AsExpression < Self :: SqlType > ,
416
416
{
417
- Grouped ( ConcatArray :: new ( self , other. as_expression ( ) ) )
417
+ Grouped ( Concat :: new ( self , other. as_expression ( ) ) )
418
418
}
419
419
}
420
420
@@ -1303,11 +1303,12 @@ pub trait PgJsonbExpressionMethods: Expression + Sized {
1303
1303
/// # Ok(())
1304
1304
/// # }
1305
1305
/// ```
1306
- fn concat < T > ( self , other : T ) -> dsl:: ConcatJsonb < Self , T >
1306
+ fn concat < T > ( self , other : T ) -> dsl:: Concat < Self , T >
1307
1307
where
1308
- T : AsExpression < Jsonb > ,
1308
+ Self :: SqlType : SqlType ,
1309
+ T : AsExpression < Self :: SqlType > ,
1309
1310
{
1310
- Grouped ( ConcatJsonb :: new ( self , other. as_expression ( ) ) )
1311
+ Grouped ( Concat :: new ( self , other. as_expression ( ) ) )
1311
1312
}
1312
1313
1313
1314
/// Creates a PostgreSQL `?` expression.
@@ -1546,11 +1547,12 @@ pub trait PgJsonbExpressionMethods: Expression + Sized {
1546
1547
/// # Ok(())
1547
1548
/// # }
1548
1549
/// ```
1549
- fn contains < T > ( self , other : T ) -> dsl:: ContainsJsonb < Self , T >
1550
+ fn contains < T > ( self , other : T ) -> dsl:: Contains < Self , T >
1550
1551
where
1551
- T : AsExpression < Jsonb > ,
1552
+ Self :: SqlType : SqlType ,
1553
+ T : AsExpression < Self :: SqlType > ,
1552
1554
{
1553
- Grouped ( ContainsJsonb :: new ( self , other. as_expression ( ) ) )
1555
+ Grouped ( Contains :: new ( self , other. as_expression ( ) ) )
1554
1556
}
1555
1557
1556
1558
/// Creates a PostgreSQL `<@` expression.
@@ -1611,11 +1613,12 @@ pub trait PgJsonbExpressionMethods: Expression + Sized {
1611
1613
/// # }
1612
1614
/// ```
1613
1615
#[ allow( clippy:: wrong_self_convention) ] // This is named after the sql operator
1614
- fn is_contained_by < T > ( self , other : T ) -> dsl:: IsContainedByJsonb < Self , T >
1616
+ fn is_contained_by < T > ( self , other : T ) -> dsl:: IsContainedBy < Self , T >
1615
1617
where
1616
- T : AsExpression < Jsonb > ,
1618
+ Self :: SqlType : SqlType ,
1619
+ T : AsExpression < Self :: SqlType > ,
1617
1620
{
1618
- Grouped ( IsContainedByJsonb :: new ( self , other. as_expression ( ) ) )
1621
+ Grouped ( IsContainedBy :: new ( self , other. as_expression ( ) ) )
1619
1622
}
1620
1623
1621
1624
/// Creates a PostgreSQL `-` expression.
@@ -2277,12 +2280,12 @@ pub trait PgBinaryExpressionMethods: Expression + Sized {
2277
2280
/// assert_eq!(Ok(expected_names), names);
2278
2281
/// # }
2279
2282
/// ```
2280
- fn concat < T > ( self , other : T ) -> dsl:: ConcatBinary < Self , T >
2283
+ fn concat < T > ( self , other : T ) -> dsl:: Concat < Self , T >
2281
2284
where
2282
2285
Self :: SqlType : SqlType ,
2283
- T : AsExpression < Binary > ,
2286
+ T : AsExpression < Self :: SqlType > ,
2284
2287
{
2285
- Grouped ( ConcatBinary :: new ( self , other. as_expression ( ) ) )
2288
+ Grouped ( Concat :: new ( self , other. as_expression ( ) ) )
2286
2289
}
2287
2290
2288
2291
/// Creates a PostgreSQL binary `LIKE` expression.
@@ -2327,12 +2330,12 @@ pub trait PgBinaryExpressionMethods: Expression + Sized {
2327
2330
/// assert_eq!(Ok(vec![b"Sean".to_vec()]), starts_with_s);
2328
2331
/// # }
2329
2332
/// ```
2330
- fn like < T > ( self , other : T ) -> dsl:: LikeBinary < Self , T >
2333
+ fn like < T > ( self , other : T ) -> dsl:: Like < Self , T >
2331
2334
where
2332
2335
Self :: SqlType : SqlType ,
2333
- T : AsExpression < Binary > ,
2336
+ T : AsExpression < Self :: SqlType > ,
2334
2337
{
2335
- Grouped ( LikeBinary :: new ( self , other. as_expression ( ) ) )
2338
+ Grouped ( Like :: new ( self , other. as_expression ( ) ) )
2336
2339
}
2337
2340
2338
2341
/// Creates a PostgreSQL binary `LIKE` expression.
@@ -2377,12 +2380,12 @@ pub trait PgBinaryExpressionMethods: Expression + Sized {
2377
2380
/// assert_eq!(Ok(vec![b"Tess".to_vec()]), starts_with_s);
2378
2381
/// # }
2379
2382
/// ```
2380
- fn not_like < T > ( self , other : T ) -> dsl:: NotLikeBinary < Self , T >
2383
+ fn not_like < T > ( self , other : T ) -> dsl:: NotLike < Self , T >
2381
2384
where
2382
2385
Self :: SqlType : SqlType ,
2383
- T : AsExpression < Binary > ,
2386
+ T : AsExpression < Self :: SqlType > ,
2384
2387
{
2385
- Grouped ( NotLikeBinary :: new ( self , other. as_expression ( ) ) )
2388
+ Grouped ( NotLike :: new ( self , other. as_expression ( ) ) )
2386
2389
}
2387
2390
}
2388
2391
@@ -2394,7 +2397,7 @@ where
2394
2397
{
2395
2398
}
2396
2399
2397
- mod private {
2400
+ pub ( in crate :: pg ) mod private {
2398
2401
use crate :: sql_types:: {
2399
2402
Array , Binary , Cidr , Inet , Integer , Json , Jsonb , Nullable , Range , SqlType , Text ,
2400
2403
} ;
0 commit comments