0.29.1
Versions
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.0
sea-query-postgres
/0.3.0
sea-query-rusqlite
/0.3.0
New Features
- Added
ValueTuple::Many
for tuple with length up to 12 #564 - Added
CREATE TABLE CHECK
constraints #567 - Added support generated column spec #581
- Added
BIT_AND
,BIT_OR
functions #582 - Added implementation
SqlxBinder
,RusqliteBinder
andPostgresBinder
forWithQuery
#580 - Added new type
Asteriks
#596 - Added
IF NOT EXISTS
forDROP INDEX
in Postgres and Sqlite #610 - Added
->
and->>
operators for Postgres #617 - Added
TableCreateStatement::set_extra
andTableCreateStatement::get_extra
#611 - Added
TableCreateStatement::comment
andColumnDef::comment
for MySQL comments #622 - Added
PgExpr::get_json_field
andPgExpr::cast_json_field
methods for constructing Postgres JSON expressions #630 - Added
PgBinOper::Regex
andPgBinOper::RegexCaseInsensitive
for Postgres Regex operators - Added
BinOper::Custom
for defining custom binary operators - Added
GLOB
operator for Sqlite #651 - Added
CREATE or DROP EXTENSION
statements for Postgres #616 - Added a feature flag
hashable-value
, which willimpl Hash for Value
; when enabled,Value::Float(NaN) == Value::Float(NaN)
would be true #598 - Added
PgBinOper::Overlap
for Postgres operators #653
Enhancements
- Implemented
PartialEq
forDynIden
,SimpleExpr
and related types #620
Breaking changes
- Removed variants
Four, Five, Six
fromenum ValueTuple
as part of #564 - Removed
Expr::tbl
,Expr::greater_than
,Expr::greater_or_equal
,Expr::less_than
,Expr::less_or_equal
,Expr::into_simple_expr
#551 - Removed
SimpleExpr::equals
andSimpleExpr::not_equals
#551 - Removed
InsertStatement::exprs
,InsertStatement::exprs_panic
#551 - Removed
OnConflict::update_value
,OnConflict::update_values
,OnConflict::update_expr
,OnConflict::update_exprs
#551 - Removed
UpdateStatement::exprs
,UpdateStatement::col_expr
,UpdateStatement::value_expr
#551 BigInteger
now maps tobigint
instead ofinteger
on SQLite #556Table::truncate
now panic for Sqlite #590- Deprecated
Expr::asteriks
andExpr::table_asteriks
#596 Expr::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 acceptT: Into<String>
#594OnConflict::values
andOnConflict::update_columns
will append the new values keeping the old values intact instead of erasing them #609- As part of #620,
SeaRc
now becomes a wrapper type.
If you usedSeaRc
for something other thandyn Iden
, you now have to useRcOrArc
.
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"));
- Added new type
Quote
and changed theIden
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;
}
House keeping
- Elided unnecessary lifetimes #552
- Changed all
version = "^x.y.z"
intoversion = "x.y.z"
in all Cargo.toml #547 - Disabled default features and enable only the needed ones #547
tests_cfg
module is available only if you enabledtests-cfg
feature #584- Removed hard coded quotes #613
- Enabled required
syn
v1 features #624 - Fix macro hygiene (
any!
/all!
) #639 #640
Bug fixes
ALTER TABLE
now panic if has multiple column for Sqlite #595- Fixed alter primary key column statements for Postgres #646
New Contributors
- @cemremengu made their first contribution in #549
- @beckend made their first contribution in #550
- @LemarAb made their first contribution in #542
- @siketyan made their first contribution in #569
- @sh-soltanpour made their first contribution in #576
- @elbertronnie made their first contribution in #590
- @matt-phylum made their first contribution in #580
- @wolfv made their first contribution in #610
- @TannerRogalsky made their first contribution in #617
- @nrot made their first contribution in #611
- @Caisin made their first contribution in #622
- @MohamedBassem made their first contribution in #630
- @rakbladsvalsen made their first contribution in #641
- @f8thl3ss made their first contribution in #651
- @darkmmon made their first contribution in #655
- @nrskt made their first contribution in #653
Full Changelog: 0.28.0...0.29.1