Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
0.32.3 source code.tar.gz | 2025-03-16 | 282.6 kB | |
0.32.3 source code.zip | 2025-03-16 | 392.3 kB | |
README.md | 2025-03-16 | 2.0 kB | |
Totals: 3 Items | 677.0 kB | 0 |
New Features
-
Support
Update FROM ..
https://github.com/SeaQL/sea-query/pull/861:::rust let query = Query::update() .table(Glyph::Table) .value(Glyph::Tokens, Expr::column((Char::Table, Char::Character))) .from(Char::Table) .cond_where( Expr::col((Glyph::Table, Glyph::Image)) .eq(Expr::col((Char::Table, Char::UserData))), ) .to_owned();
assert_eq!( query.to_string(PostgresQueryBuilder), r#"UPDATE "glyph" SET "tokens" = "character"."character" FROM "character" WHERE "glyph"."image" = "character"."user_data""# ); assert_eq!( query.to_string(SqliteQueryBuilder), r#"UPDATE "glyph" SET "tokens" = "character"."character" FROM "character" WHERE "glyph"."image" = "character"."user_data""# ); * Support
TABLESAMPLE
(Postgres) https://github.com/SeaQL/sea-query/pull/865:::rust use sea_query::extension::postgres::PostgresSelectStatementExt;
let query = Query::select() .columns([Glyph::Image]) .from(Glyph::Table) .table_sample(SampleMethod::SYSTEM, 50.0, None) .to_owned();
assert_eq!( query.to_string(PostgresQueryBuilder), r#"SELECT "image" FROM "glyph" TABLESAMPLE SYSTEM (50)"# ); * Support
ALTER COLUMN USING ..
(Postgres) https://github.com/SeaQL/sea-query/pull/848:::rust let table = Table::alter() .table(Char::Table) .modify_column( ColumnDef::new(Char::Id) .integer() .using(Expr::col(Char::Id).cast_as(Alias::new("integer"))), ) .to_owned();
assert_eq!( table.to_string(PostgresQueryBuilder), [ r#"ALTER TABLE "character""#, r#"ALTER COLUMN "id" TYPE integer USING CAST("id" AS integer)"#, ] .join(" ") );
House Keeping
- Updated
ordered-float
to4
- Updated
thiserror
to2