Skip to content

Releases: SeaQL/sea-query

0.26.3

17 Aug 16:57
Compare
Choose a tag to compare

Bug Fixes

  • DROP NOT NULL for Postgres ALTER COLUMN #394

House keeping

  • Exclude chrono default-features #410
  • Fix clippy warnings #415

0.26.2

21 Jul 15:57
Compare
Choose a tag to compare

Bug Fixes

  • Rename postgres-* features to with-* on postgres driver #377

0.26.0

01 Jul 17:12
Compare
Choose a tag to compare

New Features

  • Add support for VALUES lists (#351)
  • Introduce sea-query-binder (#275)
  • Convert from IpNetwork and MacAddress to Value (#364)

Enhancements

  • Move escape and unescape string to backend (#306)
  • LIKE ESCAPE support (#352, #353)
  • clear_order_by for OrderedStatement
  • Add method to make a column nullable (#365)
  • Add is & is_not to Expr (#348)
  • Add CURRENT_TIMESTAMP function (#349)
  • Add in_tuples method to Expr (#345)

Upgrades

  • Upgrade uuid to 1.0
  • Upgrade time to 0.3
  • Upgrade ipnetwork to 0.19
  • Upgrade bigdecimal to 0.3
  • Upgrade sqlx driver to 0.6

Breaking changes

  • As part of #306, the standalone functions escape_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 (#364)

  • Remove some redundant feature flags postgres-chrono, postgres-json, postgres-uuid, postgres-time. Use the with-* equivalence

0.25.2

01 Jul 12:11
Compare
Choose a tag to compare

New features

  • Introduce sea-query-binder (#275)

Enhancements

  • Add method to make a column nullable (#365)
  • Add is & is_not to Expr (#348)
  • Add CURRENT_TIMESTAMP function (#349)

0.25.1

26 Jun 10:20
Compare
Choose a tag to compare

Enhancements

  • clear_order_by for OrderedStatement

0.25.0

28 May 08:55
Compare
Choose a tag to compare

New Features

  • CASE WHEN statement support #304
  • Add support for Ip(4,6)Network and MacAddress #309
  • [sea-query-attr] macro for deriving Iden enum from struct #300
  • Add ability to alter foreign keys #299
  • Select DISTINCT ON #313

Enhancements

  • Insert Default #266
  • Make sea-query-driver an optional dependency #324
  • Add ABS function #334
  • Support IF NOT EXISTS when create index #332
  • Support different blob types in MySQL #314
  • Add VarBinary column type #331
  • Returning expression supporting SimpleExpr #335

Bug fixes

  • Fix arguments when nesting custom expressions #333
  • Fix clippy warnings for manual map #337

Breaking Changes

  • Introducing a dedicated ReturningClause instead of reusing Select on returning: #317
.returning(Query::select().column(Glyph::Id).take()) // before
.returning(Query::returning().columns([Glyph::Id])) // now
  • In #333, the custom expression API changed for Postgres, users should change their placeholder from ? to Postgres's $N
let 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)"#
);
  • In #314, ColumnType's Binary(Option<u32>) changed to Binary(BlobSize), so if you used Binary(None) before, you should change to Binary(BlobSize::Blob(None))

New Contributors

Full Changelog: 0.24.0...0.25.0

0.24.6

12 May 00:47
Compare
Choose a tag to compare
  • Make sea-query-driver an optional dependency #324

0.24.5

09 May 14:55
Compare
Choose a tag to compare
  • Insert or_default_values #266

0.24.3

26 Apr 14:53
Compare
Choose a tag to compare

Bug fixes

  • Fix MySQL index create statement #308

Enhancements

  • Add length check on condition array #307

0.24.2

18 Apr 03:39
Compare
Choose a tag to compare

Bug fixes

  • Fixed #303 driver breakage in 0.24.0

Notes: 0.24.0 & 0.24.1 were yanked