Releases: SeaQL/sea-query
Releases · SeaQL/sea-query
0.30.5
New Features
- Added feature flag
option-more-parenthesesto have more parentheses in expressions #723 - Added feature flag
option-sqlite-exact-column-typeto only useintegerfor SQLite - Support
COUNT(DISTINCT "column")#700 - Support index hints for MySQL (via
extension::mysql::MySqlSelectStatementExt) #636 - Support expressions for
ON CONFLICTtargets #692
Enhancements
- Add
from_clearto allow emptying current from tables in select statement #716
Breaking Changes
- Caution: do not use the
--all-featuresparam in Cargo. If you want to enable all features, use theall-featuresfeature flag instead.
Full Changelog: 0.30.4...0.30.5
0.30.4
0.30.3
sea-query-derive 0.4.1
- Upgrade
synto2
0.30.2
0.30.1
0.30.0
This is a small (but major) upgrade, the only changes are:
- Upgrade SQLx to
0.7#652 - Upgrade ipnetwork to
0.20
Versions
Full Changelog: 0.29.1...0.30.0
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.0sea-query-postgres/0.3.0sea-query-rusqlite/0.3.0
New Features
- Added
ValueTuple::Manyfor tuple with length up to 12 #564 - Added
CREATE TABLE CHECKconstraints #567 - Added support generated column spec #581
- Added
BIT_AND,BIT_ORfunctions #582 - Added implementation
SqlxBinder,RusqliteBinderandPostgresBinderforWithQuery#580 - Added new type
Asteriks#596 - Added
IF NOT EXISTSforDROP INDEXin Postgres and Sqlite #610 - Added
->and->>operators for Postgres #617 - Added
TableCreateStatement::set_extraandTableCreateStatement::get_extra#611 - Added
TableCreateStatement::commentandColumnDef::commentfor MySQL comments #622 - Added
PgExpr::get_json_fieldandPgExpr::cast_json_fieldmethods for constructing Postgres JSON expressions #630 - Added
PgBinOper::RegexandPgBinOper::RegexCaseInsensitivefor Postgres Regex operators - Added
BinOper::Customfor defining custom binary operators - Added
GLOBoperator for Sqlite #651 - Added
CREATE or DROP EXTENSIONstatements 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::Overlapfor Postgres operators #653
Enhancements
- Implemented
PartialEqforDynIden,SimpleExprand related types #620
Breaking changes
- Removed variants
Four, Five, Sixfromenum ValueTupleas 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::equalsandSimpleExpr::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 BigIntegernow maps tobigintinstead ofintegeron SQLite #556Table::truncatenow panic for Sqlite #590- Deprecated
Expr::asteriksandExpr::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::strnow acceptT: Into<String>#594OnConflict::valuesandOnConflict::update_columnswill append the new values keeping the old values intact instead of erasing them #609- As part of #620,
SeaRcnow becomes a wrapper type.
If you usedSeaRcfor 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
Quoteand changed theIdentrait:
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_cfgmodule is available only if you enabledtests-cfgfeature #584- Removed hard coded quotes #613
- Enabled required
synv1 features #624 - Fix macro hygiene (
any!/all!) #639 #640
Bug fixes
ALTER TABLEnow 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