Skip to content

Releases: SeaQL/sea-query

0.30.4

01 Dec 10:53
Compare
Choose a tag to compare

Enhancements

  • Impl QueryStatementWriter as inherent methods for WithQuery

0.30.3

22 Nov 22:16
Compare
Choose a tag to compare

New Features

  • Added LTree column type #604
  • Improved parenthesis omission logic

Bug Fixes

  • Fixed BIGINT PRIMARY KEY AUTOINCREMENT for SQLite #689

Upgrades

  • Upgrade chrono to 0.4.27

Breaking changes

  • Removed ToTokens for PgInterval #710

sea-query-derive 0.4.1

19 Oct 18:46
Compare
Choose a tag to compare
  • Upgrade syn to 2

0.30.2

23 Sep 13:52
Compare
Choose a tag to compare

Bug Fixes

  • Fixed incorrect behavior when adding an autoincrement column for Postgres #697

Enhancements

  • Make ValueTuple hashable

0.30.1

25 Aug 20:42
Compare
Choose a tag to compare

Versions

New Features

  • Added Func::round and Func::round_with_precision #671

Enhancements

  • Added some getters to FunctionCall #677

Bug Fixes

  • Fixed bytea literal syntax for Postgres #666
  • Fixed issues with semantics of parenthesis removal (backport)

0.30.0

20 Jul 10:47
Compare
Choose a tag to compare

This is a small (but major) upgrade, the only changes are:

Versions

Full Changelog: 0.29.1...0.30.0

0.29.1

20 Jul 10:45
Compare
Choose a tag to compare

Versions

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 and PostgresBinder for WithQuery #580
  • Added new type Asteriks #596
  • Added IF NOT EXISTS for DROP INDEX in Postgres and Sqlite #610
  • Added -> and ->> operators for Postgres #617
  • Added TableCreateStatement::set_extra and TableCreateStatement::get_extra #611
  • Added TableCreateStatement::comment and ColumnDef::comment for MySQL comments #622
  • Added PgExpr::get_json_field and PgExpr::cast_json_field methods for constructing Postgres JSON expressions #630
  • Added PgBinOper::Regex and PgBinOper::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 will impl 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 for DynIden, SimpleExpr and related types #620

Breaking changes

  • Removed variants Four, Five, Six from enum 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 and SimpleExpr::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 to bigint instead of integer on SQLite #556
  • Table::truncate now panic for Sqlite #590
  • Deprecated Expr::asteriks and Expr::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 accept T: Into<String> #594
  • OnConflict::values and OnConflict::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 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"));
  • Added new type 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;
}

House keeping

  • Elided unnecessary lifetimes #552
  • Changed all version = "^x.y.z" into version = "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 enabled tests-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

Full Changelog: 0.28.0...0.29.1

0.28.5

11 May 09:16
Compare
Choose a tag to compare
  • Added implementation SqlxBinder, RusqliteBinder and PostgresBinder for WithQuery #580
    • sea-query-binder 0.3.1
    • sea-query-postgres 0.2.1
    • sea-query-rusqlite 0.2.1

0.28.4

11 Apr 06:55
Compare
Choose a tag to compare

Bug fixes

  • Fix quoted string bug while inserting array of strings to Postgres #576
  • Added comma if multiple names are passed to TypeDropStatement #623

0.28.3

18 Jan 11:03
Compare
Choose a tag to compare

Enhancements

  • Added getter for the UpdateStatement::values field #578
  • Implements PartialEq for ColumnType #579
  • Added helper function to construct ColumnType::Custom #579