NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1582 most downloaded on crates.io
🔱 A dynamic query builder for MySQL, Postgres and SQLite
Last release 1 months ago
12 Aug 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
10 versions withdrawn
withdrawn after publishing
6 years old
165 releases · first in 2020
One column per quarter.
Impl QueryStatementWriter as inherent methods for WithQuery
QueryStatementWriter as inherent methods for WithQueryAdded LTree column type https://github.com/SeaQL/sea-query/pull/604
LTree column type https://github.com/SeaQL/sea-query/pull/604BIGINT PRIMARY KEY AUTOINCREMENT for SQLite https://github.com/SeaQL/sea-query/issues/689chrono to 0.4.27ToTokens for PgInterval https://github.com/SeaQL/sea-query/pull/710sea-query-derive 0.4.1 - 2023-10-19syn to 2Fixed incorrect behavior when adding an autoincrement column for Postgres https://github.com/SeaQL/sea-query/pull/697
ValueTuple hashableAdded Func::round and Func::round_with_precision https://github.com/SeaQL/sea-query/pull/671
Func::round and Func::round_with_precision https://github.com/SeaQL/sea-query/pull/671FunctionCall https://github.com/SeaQL/sea-query/pull/677FunctionCall when calling arg multiple times https://github.com/SeaQL/sea-query/pull/687FunctionCall::arg multiple times will append the arguments instead of replacing old valuessea-query 0.29 has a number of breaking changes, so it might be easier for you to first upgrade to 0.29, then upgrade sqlx by bumping to 0.30.
This is a small (but major) upgrade, the only changes are:
0.7 https://github.com/SeaQL/sea-query/pull/6520.20sea-query 0.29 has a number of breaking changes, so it might be easier for you to first upgrade to 0.29, then upgrade sqlx by bumping to 0.30.
Deprecated Expr::asteriks and Expr::table_asteriks https://github.com/SeaQL/sea-query/pull/596
sea-query/0.29.0-rc.1: 2023-03-22sea-query/0.29.0 (Yanked)sea-query/0.29.1: 2023-07-12sea-query-binder/0.4.0sea-query-postgres/0.3.0sea-query-rusqlite/0.3.0ValueTuple::Many for tuple with length up to 12 https://github.com/SeaQL/sea-query/pull/564CREATE TABLE CHECK constraints https://github.com/SeaQL/sea-query/pull/567BIT_AND, BIT_OR functions https://github.com/SeaQL/sea-query/pull/582SqlxBinder, RusqliteBinder and PostgresBinder for WithQuery https://github.com/SeaQL/sea-query/pull/580Asteriks https://github.com/SeaQL/sea-query/pull/596IF NOT EXISTS for DROP INDEX in Postgres and Sqlite https://github.com/SeaQL/sea-query/pull/610-> and ->> operators for Postgres https://github.com/SeaQL/sea-query/pull/617TableCreateStatement::set_extra and TableCreateStatement::get_extra https://github.com/SeaQL/sea-query/pull/611TableCreateStatement::comment and ColumnDef::comment for MySQL comments https://github.com/SeaQL/sea-query/pull/622PgExpr::get_json_field and PgExpr::cast_json_field methods for constructing Postgres JSON expressions https://github.com/SeaQL/sea-query/pull/630PgBinOper::Regex and PgBinOper::RegexCaseInsensitive for Postgres Regex operatorsBinOper::Custom for defining custom binary operatorsGLOB operator for Sqlite https://github.com/SeaQL/sea-query/pull/651/CREATE or DROP EXTENSION statements for Postgres https://github.com/SeaQL/sea-query/pull/616hashable-value, which will impl Hash for Value; when enabled, Value::Float(NaN) == Value::Float(NaN) would be true https://github.com/SeaQL/sea-query/pull/598PgBinOper::Overlap for Postgres operators https://github.com/SeaQL/sea-query/pull/653PartialEq for DynIden, SimpleExpr and related types https://github.com/SeaQL/sea-query/pull/620Four, Five, Six from enum ValueTuple as part of https://github.com/SeaQL/sea-query/pull/564Expr::tbl, Expr::greater_than, Expr::greater_or_equal, Expr::less_than, Expr::less_or_equal, Expr::into_simple_expr https://github.com/SeaQL/sea-query/pull/551SimpleExpr::equals and SimpleExpr::not_equals https://github.com/SeaQL/sea-query/pull/551InsertStatement::exprs, InsertStatement::exprs_panic https://github.com/SeaQL/sea-query/pull/551OnConflict::update_value, OnConflict::update_values, OnConflict::update_expr, OnConflict::update_exprs https://github.com/SeaQL/sea-query/pull/551UpdateStatement::exprs, UpdateStatement::col_expr, UpdateStatement::value_expr https://github.com/SeaQL/sea-query/pull/551BigInteger now maps to bigint instead of integer on SQLite https://github.com/SeaQL/sea-query/pull/556Table::truncate now panic for Sqlite https://github.com/SeaQL/sea-query/pull/590Expr::asteriks and Expr::table_asteriks https://github.com/SeaQL/sea-query/pull/596Expr::cust, Expr::cust_with_values, Expr::cust_with_expr, Expr::cust_with_exprs, TableForeignKey::name, ForeignKeyCreateStatement::name, ForeignKeyDropStatement::name, TableIndex::name, IndexCreateStatement::name, IndexDropStatement::name, SqlWriterValues::new, ColumnType::custom, TableCreateStatement::engine, TableCreateStatement::collate, TableCreateStatement::character_set, TableRef::new, LikeExpr::str now accept T: Into<String> https://github.com/SeaQL/sea-query/pull/594OnConflict::values and OnConflict::update_columns will append the new values keeping the old values intact instead of erasing them https://github.com/SeaQL/sea-query/pull/609SeaRc now becomes a wrapper type.
If you used SeaRc for something other than dyn Iden, you now have to use RcOrArc.
However be reminded that it is not an intended use of the API anyway.// new definition
struct SeaRc<I>(RcOrArc<I>);
// remains unchanged
type DynIden = SeaRc<dyn Iden>;
// if you did:
let _: DynIden = Rc::new(Alias::new("char"));
// replace with:
let _: DynIden = SeaRc::new(Alias::new("char"));
Quote and changed the Iden trait:struct Quote(pub(crate) u8, pub(crate) u8);
trait Iden {
// then:
fn prepare(&self, s: &mut dyn fmt::Write, q: char);
// now:
fn prepare(&self, s: &mut dyn fmt::Write, q: Quote);
// then:
fn quoted(&self, q: char) -> String;
// now:
fn quoted(&self, q: Quote) -> String;
}
version = "^x.y.z" into version = "x.y.z" in all Cargo.toml https://github.com/SeaQL/sea-query/pull/547/tests_cfg module is available only if you enabled tests-cfg feature https://github.com/SeaQL/sea-query/pull/584syn v1 features https://github.com/SeaQL/sea-query/pull/624any! / all!) https://github.com/SeaQL/sea-query/pull/639 https://github.com/SeaQL/sea-query/pull/640ALTER TABLE now panic if has multiple column for Sqlite https://github.com/SeaQL/sea-query/pull/595Nothing published for this version
Nothing published for this version
Nothing published for this version
Added implementation SqlxBinder, RusqliteBinder and PostgresBinder for WithQuery https://github.com/SeaQL/sea-query/pull/580
SqlxBinder, RusqliteBinder and PostgresBinder for WithQuery https://github.com/SeaQL/sea-query/pull/580
sea-query-binder 0.3.1sea-query-postgres 0.2.1sea-query-rusqlite 0.2.1Fix quoted string bug while inserting array of strings to Postgres https://github.com/SeaQL/sea-query/pull/576
TypeDropStatement https://github.com/SeaQL/sea-query/pull/623Added getter for the UpdateStatement::values field https://github.com/SeaQL/sea-query/pull/578
UpdateStatement::values field https://github.com/SeaQL/sea-query/pull/578PartialEq for ColumnType https://github.com/SeaQL/sea-query/pull/579ColumnType::Custom https://github.com/SeaQL/sea-query/pull/579Added Cow conversion to Value https://github.com/SeaQL/sea-query/pull/550
Cow<str> conversion to Value https://github.com/SeaQL/sea-query/pull/550UUID defined in uuid::fmt module into sea_query::Value::Uuid https://github.com/SeaQL/sea-query/pull/563Fixes Postgres GEN_RANDOM_UUID https://github.com/SeaQL/sea-query/issues/568
GEN_RANDOM_UUID https://github.com/SeaQL/sea-query/issues/568Deprecated Expr::greater_than, Expr::greater_or_equal, Expr::less_than and Expr::less_or_equal https://github.com/SeaQL/sea-query/pull/476
FunctionCall which hold function and arguments https://github.com/SeaQL/sea-query/pull/475IdenStatic with method fn as_str(&self) -> &'static str https://github.com/SeaQL/sea-query/pull/508PgExpr and SqliteExpr for custom expressions https://github.com/SeaQL/sea-query/pull/519BigDecimal, IpNetwork and MacAddress for sea-query-postgres https://github.com/SeaQL/sea-query/pull/503SelectStatement::from_function https://github.com/SeaQL/sea-query/pull/475pg_trgm extension https://github.com/SeaQL/sea-query/pull/486ILIKE and NOT ILIKE operators https://github.com/SeaQL/sea-query/pull/473mul and div methods for SimpleExpr https://github.com/SeaQL/sea-query/pull/510MATCH, -> and ->> operators for SQLite https://github.com/SeaQL/sea-query/pull/513FULL OUTER JOIN https://github.com/SeaQL/sea-query/pull/497PgFunc::get_random_uuid https://github.com/SeaQL/sea-query/pull/530SimpleExpr::eq, SimpleExpr::ne, Expr::not_equals https://github.com/SeaQL/sea-query/pull/528PgFunc::starts_with https://github.com/SeaQL/sea-query/pull/529Expr::custom_keyword and SimpleExpr::not https://github.com/SeaQL/sea-query/pull/535SimpleExpr::like, SimpleExpr::not_like and Expr::cast_as https://github.com/SeaQL/sea-query/pull/539NULLS NOT DISTINCT clause for Postgres https://github.com/SeaQL/sea-query/pull/532Expr::cust_with_expr and Expr::cust_with_exprs https://github.com/SeaQL/sea-query/pull/531&String to Value https://github.com/SeaQL/sea-query/issues/537value::with_array module public and therefore making NotU8 trait public https://github.com/SeaQL/sea-query/pull/511Sized requirement on implementers of SchemaBuilders https://github.com/SeaQL/sea-query/pull/524
// given
let (statement, values) = sea_query::Query::select()
.column(Glyph::Id)
.from(Glyph::Table)
.cond_where(Cond::any()
.add(Cond::all()) // empty all() => TRUE
.add(Cond::any()) // empty any() => FALSE
)
.build(sea_query::MysqlQueryBuilder);
// old behavior
assert_eq!(statement, r#"SELECT `id` FROM `glyph`"#);
// new behavior
assert_eq!(
statement,
r#"SELECT `id` FROM `glyph` WHERE (TRUE) OR (FALSE)"#
);
ColumnType::Array definition changed from Array(SeaRc<Box<ColumnType>>) to Array(SeaRc<ColumnType>) https://github.com/SeaQL/sea-query/pull/492Func::* now returns FunctionCall instead of SimpleExpr https://github.com/SeaQL/sea-query/pull/475Func::coalesce now accepts IntoIterator<Item = SimpleExpr> instead of IntoIterator<Item = Into<SimpleExpr> https://github.com/SeaQL/sea-query/pull/475Expr::arg and Expr::args - these functions are no longer needed https://github.com/SeaQL/sea-query/pull/475PgBinOper https://github.com/SeaQL/sea-query/pull/507Expr::value, Expr::gt, Expr::gte, Expr::lt, Expr::lte, Expr::add, Expr::div, Expr::sub, Expr::modulo, Expr::left_shift, Expr::right_shift, Expr::between, Expr::not_between, Expr::is, Expr::is_not, Expr::if_null now accepts Into<SimpleExpr> instead of Into<Value> https://github.com/SeaQL/sea-query/pull/476Expr::is_in, Expr::is_not_in now accepts Into<SimpleExpr> instead of Into<Value> and convert it to SimpleExpr::Tuple instead of SimpleExpr::Values https://github.com/SeaQL/sea-query/pull/476Expr::expr now accepts Into<SimpleExpr> instead of SimpleExpr https://github.com/SeaQL/sea-query/pull/475Expr::ilike, Expr::not_ilike, Expr::matches, Expr::contains, Expr::contained, Expr::concatenate, Expr::concat, SimpleExpr::concatenate and SimpleExpr::concat to new trait PgExpr https://github.com/SeaQL/sea-query/pull/519Expr::equals now accepts C: IntoColumnRef instead of T: IntoIden, C: IntoIden https://github.com/SeaQL/sea-query/pull/528Expr::greater_than, Expr::greater_or_equal, Expr::less_than and Expr::less_or_equal https://github.com/SeaQL/sea-query/pull/476SimpleExpr::equals, SimpleExpr::not_equals https://github.com/SeaQL/sea-query/pull/528Expr::tbl, please use Expr::col with a tuple https://github.com/SeaQL/sea-query/pull/540impl Default with #[derive(Default)] https://github.com/SeaQL/sea-query/pull/535sqlx default features https://github.com/SeaQL/sea-query/pull/543dtolnay/rust-toolchain instead of actions-rs/toolchain in CI https://github.com/SeaQL/sea-query/pull/544Made value::with_array module public and therefore making NotU8 trait public https://github.com/SeaQL/sea-query/pull/511
value::with_array module public and therefore making NotU8 trait public https://github.com/SeaQL/sea-query/pull/511Fix consecutive spacing on schema statements https://github.com/SeaQL/sea-query/pull/481
rust_decimal & bigdecimal as f64 https://github.com/SeaQL/sea-query/pull/480Removed deprecated methods (or_where, or_having, table_column etc) https://github.com/SeaQL/sea-query/pull/380
CROSS JOIN https://github.com/SeaQL/sea-query/pull/376sea-query-binder is now the recommended way (trait based) of working with SQLx, replacing sea-query-driver (macro based) https://github.com/SeaQL/sea-query/pull/434sea-query-binder is now a separate dependency, instead of integrated with sea-query https://github.com/SeaQL/sea-query/pull/432rusqlite support is moved to sea-query-rusqlite https://github.com/SeaQL/sea-query/pull/422postgres support is moved to sea-query-postgres https://github.com/SeaQL/sea-query/pull/433EXISTS, ALL, ANY, SOME https://github.com/SeaQL/sea-query/pull/379ON CONFLICT WHERE https://github.com/SeaQL/sea-query/pull/447DROP COLUMN for SQLite https://github.com/SeaQL/sea-query/pull/455YEAR, BIT and VARBIT types https://github.com/SeaQL/sea-query/pull/466%, << and >> binary operators https://github.com/SeaQL/sea-query/pull/419RAND function https://github.com/SeaQL/sea-query/pull/430Display for Value https://github.com/SeaQL/sea-query/pull/425INTERSECT and EXCEPT to UnionType https://github.com/SeaQL/sea-query/pull/438OnConflict::value and OnConflict::values https://github.com/SeaQL/sea-query/issues/451ColumnDef::default now accepts both Value and SimpleExpr https://github.com/SeaQL/sea-query/pull/436OrderedStatement::order_by_customs, OrderedStatement::order_by_columns, OverStatement::partition_by_customs, OverStatement::partition_by_columns now accepts IntoIterator<Item = T> instead of Vec<T> https://github.com/SeaQL/sea-query/pull/448Expr::case, CaseStatement::case and CaseStatement::finally now accepts Into<SimpleExpr> instead of Into<Expr> https://github.com/SeaQL/sea-query/pull/460UpdateStatement::value now accept Into<SimpleExpr> instead of Into<Value> https://github.com/SeaQL/sea-query/pull/460TableAlterStatement::rename_column, TableAlterStatement::drop_column, ColumnDef::new, ColumnDef::new_with_type now accepts IntoIden instead of Iden https://github.com/SeaQL/sea-query/pull/472distinct_on properly handles ColumnRef https://github.com/SeaQL/sea-query/pull/450ON for DROP INDEX for SQLite https://github.com/SeaQL/sea-query/pull/462ALTER TABLE for PosgreSQL with UNIQUE constraint https://github.com/SeaQL/sea-query/pull/472in_tuples interface to accept IntoValueTuple https://github.com/SeaQL/sea-query/pull/386or_where, or_having, table_column etc) https://github.com/SeaQL/sea-query/pull/380cond_where chaining semantics https://github.com/SeaQL/sea-query/pull/417// Before: will extend current Condition
assert_eq!(
Query::select()
.cond_where(any![Expr::col(Glyph::Id).eq(1), Expr::col(Glyph::Id).eq(2)])
.cond_where(Expr::col(Glyph::Id).eq(3))
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE "id" = 1 OR "id" = 2 OR "id" = 3"#
);
// Before: confusing, since it depends on the order of invocation:
assert_eq!(
Query::select()
.cond_where(Expr::col(Glyph::Id).eq(3))
.cond_where(any![Expr::col(Glyph::Id).eq(1), Expr::col(Glyph::Id).eq(2)])
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE "id" = 3 AND ("id" = 1 OR "id" = 2)"#
);
// Now: will always conjoin with `AND`
assert_eq!(
Query::select()
.cond_where(Expr::col(Glyph::Id).eq(1))
.cond_where(any![Expr::col(Glyph::Id).eq(2), Expr::col(Glyph::Id).eq(3)])
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE "id" = 1 AND ("id" = 2 OR "id" = 3)"#
);
// Now: so they are now equivalent
assert_eq!(
Query::select()
.cond_where(any![Expr::col(Glyph::Id).eq(2), Expr::col(Glyph::Id).eq(3)])
.cond_where(Expr::col(Glyph::Id).eq(1))
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE ("id" = 2 OR "id" = 3) AND "id" = 1"#
);
CURRENT_TIMESTAMP changed from being a function to keyword https://github.com/SeaQL/sea-query/pull/441boolean type from integer to boolean https://github.com/SeaQL/sea-query/pull/400ColumnType::Enum from (String, Vec<String>) to: https://github.com/SeaQL/sea-query/pull/435Enum {
name: DynIden,
variants: Vec<DynIden>,
}
InsertStatement::exprs, InsertStatement::exprs_panic, OnConflict::update_value, OnConflict::update_values, OnConflict::update_expr, OnConflict::update_exprs, UpdateStatement::col_expr, UpdateStatement::value_expr, UpdateStatement::exprs https://github.com/SeaQL/sea-query/pull/460InsertStatement::values, UpdateStatement::values now accepts IntoIterator<Item = SimpleExpr> instead of IntoIterator<Item = Value> https://github.com/SeaQL/sea-query/pull/460time https://github.com/SeaQL/sea-query/pull/412IndexBuilder trait methods https://github.com/SeaQL/sea-query/pull/426SqlWriter trait https://github.com/SeaQL/sea-query/pull/436vec! from examples https://github.com/SeaQL/sea-query/pull/448sqlx driver to 0.6.1Added support DROP COLUMN for SQLite https://github.com/SeaQL/sea-query/pull/455
DROP COLUMN for SQLite https://github.com/SeaQL/sea-query/pull/455ON for DROP INDEX for SQLite https://github.com/SeaQL/sea-query/pull/462DROP NOT NULL for Postgres ALTER COLUMN https://github.com/SeaQL/sea-query/pull/394
DROP NOT NULL for Postgres ALTER COLUMN https://github.com/SeaQL/sea-query/pull/394chrono default-features https://github.com/SeaQL/sea-query/pull/410Rename postgres-* features to with-* on postgres driver https://github.com/SeaQL/sea-query/pull/377
postgres-* features to with-* on postgres driver https://github.com/SeaQL/sea-query/pull/377Nothing published for this version
Add support for VALUES lists https://github.com/SeaQL/sea-query/pull/351
VALUES lists https://github.com/SeaQL/sea-query/pull/351sea-query-binder https://github.com/SeaQL/sea-query/pull/275IpNetwork and MacAddress to Value https://github.com/SeaQL/sea-query/pull/364escape and unescape string to backend https://github.com/SeaQL/sea-query/pull/306LIKE ESCAPE support https://github.com/SeaQL/sea-query/pull/352 #353)clear_order_by for OrderedStatementis & is_not to Expr https://github.com/SeaQL/sea-query/pull/348CURRENT_TIMESTAMP function https://github.com/SeaQL/sea-query/pull/349in_tuples method to Expr https://github.com/SeaQL/sea-query/pull/345uuid to 1.0time to 0.3ipnetwork to 0.19bigdecimal to 0.3sqlx driver to 0.6escape_string and unescape_string are removed, and becomes backend specific. So now, you have to:use sea_query::EscapeBuilder;
let string: String = MySqlQueryBuilder.escape_string(r#" "abc" "#);
let string: String = MysqlQueryBuilder.unescape_string(r#" \"abc\" "#);
Replace Value::Ipv4Network and Value::Ipv6Network to Value::IpNetwork https://github.com/SeaQL/sea-query/pull/364
Remove some redundant feature flags postgres-chrono, postgres-json, postgres-uuid, postgres-time. Use the with-* equivalence
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.25.0...0.26.0
Introduce sea-query-binder https://github.com/SeaQL/sea-query/pull/275
sea-query-binder https://github.com/SeaQL/sea-query/pull/275is & is_not to Expr https://github.com/SeaQL/sea-query/pull/348CURRENT_TIMESTAMP function https://github.com/SeaQL/sea-query/pull/349clear_order_by for OrderedStatement
clear_order_by for OrderedStatementCASE WHEN statement support https://github.com/SeaQL/sea-query/pull/304
Iden enum from struct https://github.com/SeaQL/sea-query/pull/300DISTINCT ON https://github.com/SeaQL/sea-query/pull/313sea-query-driver an optional dependency https://github.com/SeaQL/sea-query/pull/324ABS function https://github.com/SeaQL/sea-query/pull/334IF NOT EXISTS when create index https://github.com/SeaQL/sea-query/pull/332blob types in MySQL https://github.com/SeaQL/sea-query/pull/314VarBinary column type https://github.com/SeaQL/sea-query/pull/331SimpleExpr https://github.com/SeaQL/sea-query/pull/335ReturningClause instead of reusing Select on returning: https://github.com/SeaQL/sea-query/pull/317.returning(Query::select().column(Glyph::Id).take()) // before
.returning(Query::returning().columns([Glyph::Id])) // now
? to Postgres's $Nlet query = Query::select()
.columns([Char::Character, Char::SizeW, Char::SizeH])
.from(Char::Table)
.and_where(Expr::col(Char::Id).eq(1))
.and_where(Expr::cust_with_values("6 = $2 * $1", vec![3, 2]).into())
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT "character", "size_w", "size_h" FROM "character" WHERE "id" = 1 AND 6 = 2 * 3"#
);
As a side effect, ?? is no longer needed for escaping ?
let query = Query::select()
.expr(Expr::cust_with_values(
"data @? ($1::JSONPATH)",
vec!["hello"],
))
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT data @? ('hello'::JSONPATH)"#
);
ColumnType's Binary(Option<u32>) changed to Binary(BlobSize), so if you used Binary(None) before, you should change to Binary(BlobSize::Blob(None))Full Changelog: https://github.com/SeaQL/sea-query/compare/0.24.0...0.25.0
Make sea-query-driver an optional dependency https://github.com/SeaQL/sea-query/pull/324
sea-query-driver an optional dependency https://github.com/SeaQL/sea-query/pull/324Insert or_default_values https://github.com/SeaQL/sea-query/pull/266
or_default_values https://github.com/SeaQL/sea-query/pull/266* update sea-query-driver
Fix MySQL index create statement https://github.com/SeaQL/sea-query/pull/308
Fixed https://github.com/SeaQL/sea-query/issues/303 driver breakage in 0.24.0
Notes: 0.24.0 & 0.24.1 were yanked
CTE optional columns https://github.com/SeaQL/sea-query/pull/301
Add LOWER and UPPER func https://github.com/SeaQL/sea-query/pull/276
LOWER and UPPER func https://github.com/SeaQL/sea-query/pull/276ON CONFLICT support https://github.com/SeaQL/sea-query/pull/279WINDOWS statement https://github.com/SeaQL/sea-query/pull/271ANY, SOME, ALL https://github.com/SeaQL/sea-query/pull/283ALTER operations https://github.com/SeaQL/sea-query/pull/277LockType were renamed: Exclusive -> Update and Shared -> Sharesea-query-driver crate
Value::is_json and Value::as_ref_json when feature: with-json is disabledValue::is_time_* and Value::as_ref_time_* when feature: with-time is disabledValue::is_chrono_* and Value::as_ref_chrono* when feature: with-chrono is disabledValue::is_decimal, Value::as_ref_decimal and Value::decimal_to_f64 when feature: with-rust_decimal is disabledValue::is_big_decimal, Value::as_ref_big_decimal and Value::big_decimal_to_f64 when feature: with-bigdecimal is disabledValue::is_uuid and Value::as_ref_uuid when feature: with-uuid is disabledValue::is_array and Value::as_ref_array when feature: postgres-array is disabledFull Changelog: https://github.com/SeaQL/sea-query/compare/0.23.0...0.24.0
Supports time in addition to chrono https://github.com/SeaQL/sea-query/pull/267
time in addition to chrono https://github.com/SeaQL/sea-query/pull/267In order to co-exist with the time crate, Date, Time, DateTime etc are renamed to ChronoDate, ChronoTime, ChronoDateTime. In addition, new variants TimeDate, TimeTime, TimeDateTime and so on are introduced to Value.
Support multiple tables in the select from by @Sytten in https://github.com/SeaQL/sea-query/pull/261
ColumnType unsigned integer types by @billy1624 in https://github.com/SeaQL/sea-query/pull/211Full Changelog: https://github.com/SeaQL/sea-query/compare/0.21.0...0.22.0
Nothing published for this version
Nothing published for this version
Use double quotes for quoting identifiers for SQLite by @SpyrosRoum in https://github.com/SeaQL/sea-query/pull/221
RETURNING for SQLite by @SpyrosRoum in https://github.com/SeaQL/sea-query/pull/194Value::DateTimeLocal by @billy1624 in https://github.com/SeaQL/sea-query/pull/249ColumnRef::SchemaTableColumn by @billy1624 in https://github.com/SeaQL/sea-query/pull/206ColumnType::TinyInteger mapping by @billy1624 in https://github.com/SeaQL/sea-query/pull/207Full Changelog: https://github.com/SeaQL/sea-query/compare/0.20.0...0.21.0
Add TableRef::DatabaseSchemaTable by @billy1624 in https://github.com/SeaQL/sea-query/pull/193
TableRef::DatabaseSchemaTable by @billy1624 in https://github.com/SeaQL/sea-query/pull/193Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.4...0.20.0
Binding DateTime for SQLx MySQL & SQLite by @billy1624 in https://github.com/SeaQL/sea-query/pull/197
DateTime<FixedOffset> for SQLx MySQL & SQLite by @billy1624 in https://github.com/SeaQL/sea-query/pull/197Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.2...0.19.4
Nothing published for this version
Impl ValueTuple Up to Six by @billy1624 in https://github.com/SeaQL/sea-query/pull/200
ValueTuple Up to Six by @billy1624 in https://github.com/SeaQL/sea-query/pull/200Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.1...0.19.2
driver/postgres handle non-exhaustive Value by @billy1624 in https://github.com/SeaQL/sea-query/pull/191
driver/postgres handle non-exhaustive Value by @billy1624 in https://github.com/SeaQL/sea-query/pull/191Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.0...0.19.1
TableCreateStatement and TableDropStatement takes any IntoTableRef table name. by @josh-codes in https://github.com/SeaQL/sea-query/pull/186
TableCreateStatement and TableDropStatement takes any IntoTableRef table name. by @josh-codes in https://github.com/SeaQL/sea-query/pull/186ColumnType::Enum by @billy1624 in https://github.com/SeaQL/sea-query/pull/188Full Changelog: https://github.com/SeaQL/sea-query/compare/0.18.2...0.19.0
Rename "where" keywords in SelectStatement to suppress IDEA warnings by @baoyachi in https://github.com/SeaQL/sea-query/pull/166
SelectStatement to suppress IDEA warnings by @baoyachi in https://github.com/SeaQL/sea-query/pull/166Full Changelog: https://github.com/SeaQL/sea-query/compare/0.18.1...0.18.2
[[#169]] Add support for Postgres interval type
[[#159]] Add ValueType::column_type
[[#171]] Fix bug in Condition::add where Condition negation is ignored
Condition::add where Condition negation is ignored[[#164]] Revert "Fix SQLite chrono::NaiveTime binding"
chrono::NaiveTime binding"Nothing published for this version
[[#157]] Fix binding nullable custom types on db drivers
The as_ref_* methods on Value are changed:
pub fn as_ref_json(&self) -> &Json;
Is now
pub fn as_ref_json(&self) -> Option<&Json>;
[[#171]] Fix bug in Condition::add where Condition negation is ignored
Condition::add where Condition negation is ignored[[#149]] Fix SQLite chrono::NaiveTime binding
Fix table drop options for SQLite
IndexCreateStatement::is_unique_key()[[#131]] InsertStatement accepts SimpleExpr
[[#120]] Support RETURNING for DeleteStatement
[[#129]] MySql ColumnType::Binary(None) maps to "blob"
ColumnType::Binary(None) maps to "blob"[[#112]] Introduce Nullable trait to permit custom Option
[#112] Introduce Nullable trait to permit custom Option<T>
[#113] ValueType trait should have a non-panic-ing method
[#114] ValueType revamp
ValueTypeDefaulttype_name to return String[#115] Postgres concatenate operator (||)
[#117] Lock support (FOR SHARE, FOR UPDATE) for SELECT statement
[[#107]] Revamp Value to typed null value
Value to typed null valueBigDecimal supportThe Value::Null variant is removed. You have to use a specific variant with a None.
Before:
Query::insert()
.values_panic(vec![
Value::Null,
2.1345.into(),
])
After:
Query::insert()
.values_panic(vec![
Value::String(None),
2.1345.into(),
])
Since we cannot handle the generic Null value on JSON, we removed the json method on InsertStatement and UpdateStatement. The following NO LONGER WORKS:
let query = Query::insert()
.into_table(Glyph::Table)
.json(json!({
"aspect": 2.1345,
"image": "24B",
}));
let query = Query::update()
.table(Glyph::Table)
.json(json!({
"aspect": 2.1345,
"image": "235m",
}));
In addition, if you constructed Value manually before (instead of using into() which is unaffected), you have to wrap them in an Option:
Before:
let (sql, values) = query.build(PostgresQueryBuilder);
assert_eq!(
values,
Values(vec![Value::String(Box::new("A".to_owned())), Value::Int(1), Value::Int(2), Value::Int(3)]))
);
After:
let (sql, values) = query.build(PostgresQueryBuilder);
assert_eq!(
values,
Values(vec![Value::String(Some(Box::new("A".to_owned()))), Value::Int(Some(1)), Value::Int(Some(2)), Value::Int(Some(3))]))
);
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →