@@ -5,6 +5,72 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
7
7
8
+ ## 0.32.3 - 2025-03-16
9
+
10
+ ### New Features
11
+
12
+ * Support ` Update FROM .. ` https://github.com/SeaQL/sea-query/pull/861
13
+ ``` rust
14
+ let query = Query :: update ()
15
+ . table (Glyph :: Table )
16
+ . value (Glyph :: Tokens , Expr :: column ((Char :: Table , Char :: Character )))
17
+ . from (Char :: Table )
18
+ . cond_where (
19
+ Expr :: col ((Glyph :: Table , Glyph :: Image ))
20
+ . eq (Expr :: col ((Char :: Table , Char :: UserData ))),
21
+ )
22
+ . to_owned ();
23
+
24
+ assert_eq! (
25
+ query . to_string (PostgresQueryBuilder ),
26
+ r # " UPDATE "glyph" SET "tokens" = "character"."character" FROM "character" WHERE "glyph"."image" = "character"."user_data"" #
27
+ );
28
+ assert_eq! (
29
+ query . to_string (SqliteQueryBuilder ),
30
+ r # " UPDATE "glyph" SET "tokens" = "character"."character" FROM "character" WHERE "glyph"."image" = "character"."user_data"" #
31
+ );
32
+ ```
33
+ * Support ` TABLESAMPLE ` (Postgres) https://github.com/SeaQL/sea-query/pull/865
34
+ ``` rust
35
+ use sea_query :: extension :: postgres :: PostgresSelectStatementExt ;
36
+
37
+ let query = Query :: select ()
38
+ . columns ([Glyph :: Image ])
39
+ . from (Glyph :: Table )
40
+ . table_sample (SampleMethod :: SYSTEM , 50.0 , None )
41
+ . to_owned ();
42
+
43
+ assert_eq! (
44
+ query . to_string (PostgresQueryBuilder ),
45
+ r # " SELECT "image" FROM "glyph" TABLESAMPLE SYSTEM (50)" #
46
+ );
47
+ ```
48
+ * Support ` ALTER COLUMN USING .. ` (Postgres) https://github.com/SeaQL/sea-query/pull/848
49
+ ``` rust
50
+ let table = Table :: alter ()
51
+ . table (Char :: Table )
52
+ . modify_column (
53
+ ColumnDef :: new (Char :: Id )
54
+ . integer ()
55
+ . using (Expr :: col (Char :: Id ). cast_as (Alias :: new (" integer" ))),
56
+ )
57
+ . to_owned ();
58
+
59
+ assert_eq! (
60
+ table . to_string (PostgresQueryBuilder ),
61
+ [
62
+ r # " ALTER TABLE "character"" # ,
63
+ r # " ALTER COLUMN "id" TYPE integer USING CAST("id" AS integer)" # ,
64
+ ]
65
+ . join (" " )
66
+ );
67
+ ```
68
+
69
+ ### House Keeping
70
+
71
+ * Updated ` ordered-float ` to ` 4 `
72
+ * Updated ` thiserror ` to ` 2 `
73
+
8
74
## 0.32.2 - 2025-02-18
9
75
10
76
### New Features
0 commit comments