pub struct InsertStatement { /* private fields */ }Expand description
Insert any new rows into an existing table
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["aspect", "image"])
.values_panic([5.15.into(), "12A".into()])
.values_panic([4.21.into(), "123".into()])
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`aspect`, `image`) VALUES (5.15, '12A'), (4.21, '123')"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (5.15, '12A'), (4.21, '123')"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (5.15, '12A'), (4.21, '123')"#
);Implementations§
Source§impl InsertStatement
impl InsertStatement
pub fn build_any( &self, query_builder: &impl QueryBuilder, ) -> Result<(String, Values), RenderError>
pub fn build_collect_any( &self, query_builder: &impl QueryBuilder, sql: &mut impl SqlWriter, ) -> Result<String, RenderError>
pub fn build_collect_any_into( &self, query_builder: &impl QueryBuilder, sql: &mut impl SqlWriter, ) -> Result<(), RenderError>
Source§impl InsertStatement
impl InsertStatement
pub fn to_string<T: QueryBuilder>( &self, query_builder: T, ) -> Result<String, RenderError>
pub fn build<T: QueryBuilder>( &self, query_builder: T, ) -> Result<(String, Values), RenderError>
pub fn build_collect<T: QueryBuilder>( &self, query_builder: T, sql: &mut impl SqlWriter, ) -> Result<String, RenderError>
pub fn build_collect_into<T: QueryBuilder>( &self, query_builder: T, sql: &mut impl SqlWriter, ) -> Result<(), RenderError>
Source§impl InsertStatement
impl InsertStatement
Sourcepub fn on_conflict(&mut self, on_conflict: OnConflict) -> &mut Self
pub fn on_conflict(&mut self, on_conflict: OnConflict) -> &mut Self
ON CONFLICT expression
§Examples
OnConflict::update_columns: Update column value of existing row with inserting value
Sourcepub fn has_on_conflict(&self) -> bool
pub fn has_on_conflict(&self) -> bool
Whether the statement says what to do on a conflict.
Sourcepub fn returning(&mut self, returning: ReturningClause) -> &mut Self
pub fn returning(&mut self, returning: ReturningClause) -> &mut Self
RETURNING expressions.
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["image"])
.values_panic(["12A".into()])
.returning(Query::returning().columns(["id"]))
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
"INSERT INTO `glyph` (`image`) VALUES ('12A') RETURNING `id`"
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('12A') RETURNING "id""#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('12A') RETURNING "id""#
);Sourcepub fn returning_col<C>(&mut self, col: C) -> &mut Selfwhere
C: IntoColumnRef,
pub fn returning_col<C>(&mut self, col: C) -> &mut Selfwhere
C: IntoColumnRef,
RETURNING expressions for a column.
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["image"])
.values_panic(["12A".into()])
.returning_col("id")
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
"INSERT INTO `glyph` (`image`) VALUES ('12A') RETURNING `id`"
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('12A') RETURNING "id""#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('12A') RETURNING "id""#
);Sourcepub fn returning_all(&mut self) -> &mut Self
pub fn returning_all(&mut self) -> &mut Self
RETURNING expressions all columns.
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["image"])
.values_panic(["12A".into()])
.returning_all()
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
"INSERT INTO `glyph` (`image`) VALUES ('12A') RETURNING *"
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('12A') RETURNING *"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('12A') RETURNING *"#
);Sourcepub fn with(self, clause: WithClause) -> WithQuery
pub fn with(self, clause: WithClause) -> WithQuery
Create a WithQuery by specifying a WithClause to execute this query with.
§Examples
use sql_builder::{*, IntoCondition, IntoIden};
let select = SelectStatement::new()
.columns(["id", "image", "aspect"])
.from("glyph")
.take();
let cte = CommonTableExpression::new()
.query(select)
.column("id")
.column("image")
.column("aspect")
.table_name("cte")
.to_owned();
let with_clause = WithClause::new().cte(cte).to_owned();
let select = SelectStatement::new()
.columns(["id", "image", "aspect"])
.from("cte")
.take();
let mut insert = Query::insert();
insert
.into_table("glyph")
.columns(["id", "image", "aspect"])
.select_from(select)
.unwrap();
let query = insert.with(with_clause);
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"WITH `cte` (`id`, `image`, `aspect`) AS (SELECT `id`, `image`, `aspect` FROM `glyph`) INSERT INTO `glyph` (`id`, `image`, `aspect`) SELECT `id`, `image`, `aspect` FROM `cte`"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"WITH "cte" ("id", "image", "aspect") AS (SELECT "id", "image", "aspect" FROM "glyph") INSERT INTO "glyph" ("id", "image", "aspect") SELECT "id", "image", "aspect" FROM "cte""#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"WITH "cte" ("id", "image", "aspect") AS (SELECT "id", "image", "aspect" FROM "glyph") INSERT INTO "glyph" ("id", "image", "aspect") SELECT "id", "image", "aspect" FROM "cte""#
);Sourcepub fn with_cte<C: Into<WithClause>>(&mut self, clause: C) -> &mut Self
pub fn with_cte<C: Into<WithClause>>(&mut self, clause: C) -> &mut Self
Create a Common Table Expression by specifying a CommonTableExpression or WithClause to execute this query with.
§Examples
use sql_builder::{*, IntoCondition, IntoIden};
let select = SelectStatement::new()
.columns(["id", "image", "aspect"])
.from("glyph")
.take();
let cte = CommonTableExpression::new()
.query(select)
.column("id")
.column("image")
.column("aspect")
.table_name("cte")
.to_owned();
let with_clause = WithClause::new().cte(cte).to_owned();
let select = SelectStatement::new()
.columns(["id", "image", "aspect"])
.from("cte")
.take();
let mut query = Query::insert();
query
.with_cte(with_clause)
.into_table("glyph")
.columns(["id", "image", "aspect"])
.select_from(select)
.unwrap();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"WITH `cte` (`id`, `image`, `aspect`) AS (SELECT `id`, `image`, `aspect` FROM `glyph`) INSERT INTO `glyph` (`id`, `image`, `aspect`) SELECT `id`, `image`, `aspect` FROM `cte`"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"WITH "cte" ("id", "image", "aspect") AS (SELECT "id", "image", "aspect" FROM "glyph") INSERT INTO "glyph" ("id", "image", "aspect") SELECT "id", "image", "aspect" FROM "cte""#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"WITH "cte" ("id", "image", "aspect") AS (SELECT "id", "image", "aspect" FROM "glyph") INSERT INTO "glyph" ("id", "image", "aspect") SELECT "id", "image", "aspect" FROM "cte""#
);Sourcepub fn or_default_values(&mut self) -> &mut Self
pub fn or_default_values(&mut self) -> &mut Self
Insert with default values if columns and values are not supplied.
§Examples
use sql_builder::*;
// Insert default
let query = Query::insert()
.into_table("glyph")
.or_default_values()
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` VALUES ()"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" VALUES (DEFAULT)"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" DEFAULT VALUES"#
);
// Ordinary insert as columns and values are supplied
let query = Query::insert()
.into_table("glyph")
.or_default_values()
.columns(["image"])
.values_panic(["ABC".into()])
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`image`) VALUES ('ABC')"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('ABC')"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('ABC')"#
);Sourcepub fn or_default_values_many(&mut self, num_rows: usize) -> &mut Self
pub fn or_default_values_many(&mut self, num_rows: usize) -> &mut Self
Insert multiple rows with default values if columns and values are not supplied.
§Examples
use sql_builder::*;
// Insert default
let query = Query::insert()
.into_table("glyph")
.or_default_values_many(3)
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` VALUES (), (), ()"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" VALUES (DEFAULT), (DEFAULT), (DEFAULT)"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" (rowid) VALUES (NULL), (NULL), (NULL)"#
);
// Ordinary insert as columns and values are supplied
let query = Query::insert()
.into_table("glyph")
.or_default_values_many(3)
.columns(["image"])
.values_panic(["ABC".into()])
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`image`) VALUES ('ABC')"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('ABC')"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") VALUES ('ABC')"#
);Source§impl InsertStatement
impl InsertStatement
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new InsertStatement
Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Take the ownership of data in the current SelectStatement
Sourcepub fn replace(&mut self) -> &mut Self
pub fn replace(&mut self) -> &mut Self
Use REPLACE instead of INSERT. PostgreSQL has none and refuses to render it.
§Examples
use sql_builder::*;
let query = Query::insert()
.replace()
.into_table("glyph")
.columns(["aspect", "image"])
.values_panic([5.15.into(), "12A".into()])
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"REPLACE INTO `glyph` (`aspect`, `image`) VALUES (5.15, '12A')"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"REPLACE INTO "glyph" ("aspect", "image") VALUES (5.15, '12A')"#
);Sourcepub fn into_table<T>(&mut self, tbl_ref: T) -> &mut Selfwhere
T: IntoTableRef,
pub fn into_table<T>(&mut self, tbl_ref: T) -> &mut Selfwhere
T: IntoTableRef,
Sourcepub fn columns<C, I>(&mut self, columns: I) -> &mut Selfwhere
C: IntoIden,
I: IntoIterator<Item = C>,
pub fn columns<C, I>(&mut self, columns: I) -> &mut Selfwhere
C: IntoIden,
I: IntoIterator<Item = C>,
Sourcepub fn select_from<S>(&mut self, select: S) -> Result<&mut Self>where
S: Into<SelectStatement>,
pub fn select_from<S>(&mut self, select: S) -> Result<&mut Self>where
S: Into<SelectStatement>,
Specify a select query whose values to be inserted.
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["aspect", "image"])
.select_from(Query::select()
.column("aspect")
.column("image")
.from("glyph")
.and_where(Expr::col("image").like("0%"))
.take()
)
.unwrap()
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`aspect`, `image`) SELECT `aspect`, `image` FROM `glyph` WHERE `image` LIKE '0%'"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") SELECT "aspect", "image" FROM "glyph" WHERE "image" LIKE '0%'"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") SELECT "aspect", "image" FROM "glyph" WHERE "image" LIKE '0%'"#
);use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["image"])
.select_from(
Query::select()
.expr(Expr::val("hello"))
.cond_where(Cond::all().not().add(Expr::exists(
Query::select().expr(Expr::val("world")).take(),
)))
.take(),
)
.unwrap()
.take();
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") SELECT 'hello' WHERE NOT EXISTS(SELECT 'world')"#
);use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["image"])
.select_from(
Query::select()
.expr(Expr::col("name"))
.from("font")
.take(),
)
.unwrap()
.take();
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("image") SELECT "name" FROM "font""#
);Sourcepub fn values<I>(&mut self, values: I) -> Result<&mut Self>where
I: IntoIterator<Item = Expr>,
pub fn values<I>(&mut self, values: I) -> Result<&mut Self>where
I: IntoIterator<Item = Expr>,
Specify a row of values to be inserted.
Return error when number of values not matching number of columns.
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["aspect", "image"])
.values([
2.into(),
Func::cast_as("2020-02-02 00:00:00", "DATE").into(),
])
.unwrap()
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`aspect`, `image`) VALUES (2, CAST('2020-02-02 00:00:00' AS DATE))"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (2, CAST('2020-02-02 00:00:00' AS DATE))"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (2, CAST('2020-02-02 00:00:00' AS DATE))"#
);
assert!(
Query::insert()
.into_table("glyph")
.columns(["aspect", "image"])
.values([1.into()])
.is_err()
);Sourcepub fn values_panic<I>(&mut self, values: I) -> &mut Selfwhere
I: IntoIterator<Item = Expr>,
pub fn values_panic<I>(&mut self, values: I) -> &mut Selfwhere
I: IntoIterator<Item = Expr>,
Specify a row of values to be inserted, variation of InsertStatement::values.
§Panics
Panics when number of values not matching number of columns.
The engine’s insert_many does not panic: it builds the column list from the active models.
§Examples
use sql_builder::*;
let query = Query::insert()
.into_table("glyph")
.columns(["aspect", "image"])
.values_panic([2.1345.into(), "24B".into()])
.values_panic([5.15.into(), "12A".into()])
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`aspect`, `image`) VALUES (2.1345, '24B'), (5.15, '12A')"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (2.1345, '24B'), (5.15, '12A')"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (2.1345, '24B'), (5.15, '12A')"#
);let query = Query::insert()
.into_table("glyph")
.columns(["aspect"])
.values_panic([2.1345.into(), "24B".into()])
.take();Sourcepub fn values_from_panic<I, J>(&mut self, values_iter: J) -> &mut Self
pub fn values_from_panic<I, J>(&mut self, values_iter: J) -> &mut Self
Add rows to be inserted from an iterator, variation of InsertStatement::values_panic.
§Examples
use sql_builder::*;
let rows = vec![[2.1345.into(), "24B".into()], [5.15.into(), "12A".into()]];
let query = Query::insert()
.into_table("glyph")
.columns(["aspect", "image"])
.values_from_panic(rows)
.take();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"INSERT INTO `glyph` (`aspect`, `image`) VALUES (2.1345, '24B'), (5.15, '12A')"#
);
assert_eq!(
query.to_string(PostgresQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (2.1345, '24B'), (5.15, '12A')"#
);
assert_eq!(
query.to_string(SqliteQueryBuilder).unwrap(),
r#"INSERT INTO "glyph" ("aspect", "image") VALUES (2.1345, '24B'), (5.15, '12A')"#
);Trait Implementations§
Source§impl Clone for InsertStatement
impl Clone for InsertStatement
Source§impl Debug for InsertStatement
impl Debug for InsertStatement
Source§impl Default for InsertStatement
impl Default for InsertStatement
Source§impl From<InsertStatement> for Expr
impl From<InsertStatement> for Expr
Source§fn from(v: InsertStatement) -> Self
fn from(v: InsertStatement) -> Self
Source§impl From<InsertStatement> for QueryStatement
impl From<InsertStatement> for QueryStatement
Source§fn from(s: InsertStatement) -> Self
fn from(s: InsertStatement) -> Self
Source§impl From<InsertStatement> for SubQueryStatement
impl From<InsertStatement> for SubQueryStatement
Source§fn from(s: InsertStatement) -> Self
fn from(s: InsertStatement) -> Self
Source§impl PartialEq for InsertStatement
impl PartialEq for InsertStatement
Source§impl QueryStatementBuilder for InsertStatement
impl QueryStatementBuilder for InsertStatement
Source§fn build_collect_any_into(
&self,
query_builder: &impl QueryBuilder,
sql: &mut impl SqlWriter,
) -> Result<(), RenderError>
fn build_collect_any_into( &self, query_builder: &impl QueryBuilder, sql: &mut impl SqlWriter, ) -> Result<(), RenderError>
sql, stopping at the first part that cannot be rendered.Source§fn build_any(
&self,
query_builder: &impl QueryBuilder,
) -> Result<(String, Values), RenderError>
fn build_any( &self, query_builder: &impl QueryBuilder, ) -> Result<(String, Values), RenderError>
Source§fn build_collect_any(
&self,
query_builder: &impl QueryBuilder,
sql: &mut impl SqlWriter,
) -> Result<String, RenderError>
fn build_collect_any( &self, query_builder: &impl QueryBuilder, sql: &mut impl SqlWriter, ) -> Result<String, RenderError>
fn into_sub_query_statement(self) -> SubQueryStatement
Source§impl QueryStatementWriter for InsertStatement
impl QueryStatementWriter for InsertStatement
Source§fn to_string<T: QueryBuilder>(
&self,
query_builder: T,
) -> Result<String, RenderError>
fn to_string<T: QueryBuilder>( &self, query_builder: T, ) -> Result<String, RenderError>
Source§fn build<T: QueryBuilder>(
&self,
query_builder: T,
) -> Result<(String, Values), RenderError>
fn build<T: QueryBuilder>( &self, query_builder: T, ) -> Result<(String, Values), RenderError>
Source§fn build_collect<T: QueryBuilder>(
&self,
query_builder: T,
sql: &mut impl SqlWriter,
) -> Result<String, RenderError>
fn build_collect<T: QueryBuilder>( &self, query_builder: T, sql: &mut impl SqlWriter, ) -> Result<String, RenderError>
Source§fn build_collect_into<T: QueryBuilder>(
&self,
query_builder: T,
sql: &mut impl SqlWriter,
) -> Result<(), RenderError>
fn build_collect_into<T: QueryBuilder>( &self, query_builder: T, sql: &mut impl SqlWriter, ) -> Result<(), RenderError>
sql, stopping at the first part that cannot be rendered.impl StructuralPartialEq for InsertStatement
Auto Trait Implementations§
impl Forget for InsertStatement
impl Freeze for InsertStatement
impl RefUnwindSafe for InsertStatement
impl Send for InsertStatement
impl Sync for InsertStatement
impl Unpin for InsertStatement
impl UnsafeUnpin for InsertStatement
impl UnwindSafe for InsertStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ExprTrait for T
impl<T> ExprTrait for T
Source§fn as_enum<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
fn as_enum<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
AS enum expression. Read moreSource§fn cast_as<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
fn cast_as<N>(self, type_name: N) -> Exprwhere
N: IntoIden,
CAST AS expression. Read moreSource§fn count_distinct(self) -> Expr
fn count_distinct(self) -> Expr
COUNT function with the DISTINCT modifier. Read moreSource§fn equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
fn equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
Source§fn in_subquery(self, sel: SelectStatement) -> Expr
fn in_subquery(self, sel: SelectStatement) -> Expr
IN sub-query expression. Read moreSource§fn in_tuples<V, I>(self, v: I) -> Exprwhere
V: IntoValueTuple,
I: IntoIterator<Item = V>,
fn in_tuples<V, I>(self, v: I) -> Exprwhere
V: IntoValueTuple,
I: IntoIterator<Item = V>,
IN sub expression. Read moreSource§fn is_not_null(self) -> Expr
fn is_not_null(self) -> Expr
IS NOT NULL expression. Read moreSource§fn left_shift<R>(self, right: R) -> Expr
fn left_shift<R>(self, right: R) -> Expr
Source§fn not_between<A, B>(self, a: A, b: B) -> Expr
fn not_between<A, B>(self, a: A, b: B) -> Expr
NOT BETWEEN expression. Read moreSource§fn not_equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
fn not_equals<C>(self, col: C) -> Exprwhere
C: IntoColumnRef,
Source§fn not_in_subquery(self, sel: SelectStatement) -> Expr
fn not_in_subquery(self, sel: SelectStatement) -> Expr
NOT IN sub-query expression. Read moreSource§fn not_like<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
fn not_like<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
NOT LIKE expression. Read moreSource§fn right_shift<R>(self, right: R) -> Expr
fn right_shift<R>(self, right: R) -> Expr
Source§impl<T> PgExpr for Twhere
T: ExprTrait,
impl<T> PgExpr for Twhere
T: ExprTrait,
Source§fn concatenate<T>(self, right: T) -> Expr
fn concatenate<T>(self, right: T) -> Expr
||) expression. Read moreSource§fn matches<T>(self, expr: T) -> Expr
fn matches<T>(self, expr: T) -> Expr
@@) expression. Read moreSource§fn contains<T>(self, expr: T) -> Expr
fn contains<T>(self, expr: T) -> Expr
@>) expression. Read moreSource§fn contained<T>(self, expr: T) -> Expr
fn contained<T>(self, expr: T) -> Expr
<@) expression. Read moreSource§fn ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
fn ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
ILIKE expression. Read moreSource§fn not_ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
fn not_ilike<L>(self, like: L) -> Exprwhere
L: IntoLikeExpr,
NOT ILIKE expressionSource§fn get_json_field<T>(self, right: T) -> Expr
fn get_json_field<T>(self, right: T) -> Expr
->). Read moreSource§fn cast_json_field<T>(self, right: T) -> Expr
fn cast_json_field<T>(self, right: T) -> Expr
->>). Read more