@@ -5,26 +5,65 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## 0.3.5 - 2020-05-06
9
+
10
+ ### Fixed
11
+
12
+ - [[ #259 ]] Handle percent-encoded paths for SQLite [[ @g-s-k ]]
13
+
14
+ - [[ #281 ]] Deallocate SQLite statements before closing the SQLite connection [[ @hasali19 ]]
15
+
16
+ - [[ #284 ]] Fix handling of ` 0 ` for ` BigDecimal ` in PostgreSQL and MySQL [[ @abonander ]]
17
+
18
+ ### Added
19
+
20
+ - [[ #256 ]] Add ` query_unchecked! ` and ` query_file_unchecked! ` with similar semantics to ` query_as_unchecked! ` [[ @meh ]]
21
+
22
+ - [[ #252 ]] [[ #297 ]] Derive serveral traits for the ` Json<T> ` wrapper type [[ @meh ]]
23
+
24
+ - [[ #261 ]] Add support for ` #[sqlx(rename_all = "snake_case")] ` to ` #[derive(Type)] ` [[ @shssoichiro ]]
25
+
26
+ - [[ #253 ]] Add support for UNIX domain sockets to PostgreSQL [[ @Nilix007 ]]
27
+
28
+ - [[ #251 ]] Add support for textual JSON on MySQL [[ @blackwolf12333 ]]
29
+
30
+ - [[ #275 ]] [[ #268 ]] Optionally log formatted SQL queries on execution [[ @shssoichiro ]]
31
+
32
+ - [[ #267 ]] Support Cargo.toml relative ` .env ` files; allows for each crate in a workspace to use their own ` .env ` file and thus their own ` DATABASE_URL ` [[ @xyzd ]]
33
+
34
+ [ #252 ] : https://github.com/launchbadge/sqlx/pull/252
35
+ [ #261 ] : https://github.com/launchbadge/sqlx/pull/261
36
+ [ #256 ] : https://github.com/launchbadge/sqlx/pull/256
37
+ [ #259 ] : https://github.com/launchbadge/sqlx/pull/259
38
+ [ #253 ] : https://github.com/launchbadge/sqlx/pull/253
39
+ [ #297 ] : https://github.com/launchbadge/sqlx/pull/297
40
+ [ #251 ] : https://github.com/launchbadge/sqlx/pull/251
41
+ [ #275 ] : https://github.com/launchbadge/sqlx/pull/275
42
+ [ #267 ] : https://github.com/launchbadge/sqlx/pull/267
43
+ [ #268 ] : https://github.com/launchbadge/sqlx/pull/268
44
+ [ #281 ] : https://github.com/launchbadge/sqlx/pull/281
45
+ [ #284 ] : https://github.com/launchbadge/sqlx/pull/284
46
+
8
47
## 0.3.4 - 2020-04-10
9
48
10
49
### Fixed
11
50
12
51
- [[ #241 ]] Type name for custom enum is not always attached to TypeInfo in PostgreSQL
13
-
52
+
14
53
- [[ #237 ]] [[ #238 ]] User-defined type name matching is now case-insensitive in PostgreSQL [[ @qtbeee ]]
15
-
54
+
16
55
- [[ #231 ]] Handle empty queries (and those with comments) in SQLite
17
-
56
+
18
57
- [[ #228 ]] Provide ` MapRow ` implementations for functions (enables ` .map(|row| ...) ` over ` .try_map(|row| ...) ` )
19
58
20
59
### Added
21
60
22
61
- [[ #234 ]] Add support for ` NUMERIC ` in MySQL with the ` bigdecimal ` crate [[ @xiaopengli89 ]]
23
-
62
+
24
63
- [[ #227 ]] Support ` #[sqlx(rename = "new_name")] ` on struct fields within a ` FromRow ` derive [[ @sidred ]]
25
64
26
65
[ #228 ] : https://github.com/launchbadge/sqlx/issues/228
27
- [ #231 ] : https://github.com/launchbadge/sqlx/issues/231
66
+ [ #231 ] : https://github.com/launchbadge/sqlx/issues/231
28
67
[ #237 ] : https://github.com/launchbadge/sqlx/issues/237
29
68
[ #241 ] : https://github.com/launchbadge/sqlx/issues/241
30
69
@@ -41,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
41
80
### Changed
42
81
43
82
- [[ #216 ]] Mark ` Cursor ` , ` Query ` , ` QueryAs ` , ` query::Map ` , and ` Transaction ` as ` #[must_use] ` [[ @Ace4896 ]]
44
-
83
+
45
84
- [[ #213 ]] Remove matches dependency and use matches macro from std [[ @nrjais ]]
46
85
47
86
[ #216 ] : https://github.com/launchbadge/sqlx/pull/216
@@ -53,20 +92,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
53
92
### Fixed
54
93
55
94
- [[ #212 ]] Removed sneaky ` println! ` in ` MySqlCursor `
56
-
95
+
57
96
[ #212 ] : https://github.com/launchbadge/sqlx/issues/212
58
97
59
98
## 0.3.1 - 2020-03-30
60
99
61
100
### Fixed
62
101
63
102
- [[ #203 ]] Allow an empty password for MySQL
64
-
103
+
65
104
- [[ #204 ]] Regression in error reporting for invalid SQL statements on PostgreSQL
66
-
105
+
67
106
- [[ #200 ]] Fixes the incorrect handling of raw (` r#... ` ) fields of a struct in the ` FromRow ` derive [[ @sidred ]]
68
107
69
- [ #200 ] : https://github.com/launchbadge/sqlx/pull/200
108
+ [ #200 ] : https://github.com/launchbadge/sqlx/pull/200
70
109
[ #203 ] : https://github.com/launchbadge/sqlx/issues/203
71
110
[ #204 ] : https://github.com/launchbadge/sqlx/issues/204
72
111
@@ -93,13 +132,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
93
132
. fetch_all (& mut conn ). await ? ;
94
133
```
95
134
96
- To assist with the above, ` sqlx::query_as() ` now supports querying directly into tuples (up to 9 elements) or
135
+ To assist with the above, ` sqlx::query_as() ` now supports querying directly into tuples (up to 9 elements) or
97
136
struct types with a ` #[derive(FromRow)] ` .
98
137
99
138
``` rust
100
139
// This extension trait is needed until a rust bug is fixed
101
140
use sqlx :: postgres :: PgQueryAs ;
102
-
141
+
103
142
let values : Vec <(i32 , bool )> = sqlx :: query_as (" SELECT 1, false" )
104
143
. fetch_all (& mut conn ). await ? ;
105
144
```
@@ -109,13 +148,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109
148
- ` Query::fetch ` (returned from ` query() ` ) now returns a new ` Cursor ` type. ` Cursor ` is a Stream-like type where the
110
149
item type borrows into the stream (which itself borrows from connection). This means that using ` query().fetch() ` you can now
111
150
stream directly from the database with ** zero-copy** and ** zero-allocation** .
112
-
151
+
113
152
- Remove ` PgTypeInfo::with_oid ` and replace with ` PgTypeInfo::with_name `
114
153
115
154
### Added
116
155
117
156
- Results from the database are now zero-copy and no allocation beyond a shared read buffer
118
- for the TCP stream ( in other words, almost no per-query allocation ). Bind arguments still
157
+ for the TCP stream ( in other words, almost no per-query allocation ). Bind arguments still
119
158
do allocate a buffer per query.
120
159
121
160
- [[ #129 ]] Add support for [ SQLite] ( https://sqlite.org/index.html ) . Generated code should be very close to normal use of the C API.
@@ -180,17 +219,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
180
219
println! (" payload = {}" , message . payload);
181
220
}
182
221
```
183
-
184
- - Add _ unchecked_ variants of the query macros. These will still verify the SQL for syntactic and
222
+
223
+ - Add _ unchecked_ variants of the query macros. These will still verify the SQL for syntactic and
185
224
semantic correctness with the current database but they will not check the input or output types.
186
-
225
+
187
226
This is intended as a temporary solution until ` query_as! ` is able to support user defined types.
188
-
227
+
189
228
* ` query_as_unchecked! `
190
229
* ` query_file_as_unchecked! `
191
-
230
+
192
231
- Add support for many more types in Postgres
193
-
232
+
194
233
- ` JSON ` , ` JSONB ` [[ @oeb25 ]]
195
234
- ` INET ` , ` CIDR ` [[ @PoiScript ]]
196
235
- Arrays [[ @oeb25 ]]
@@ -213,7 +252,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
213
252
214
253
``` rust
215
254
use sqlx :: Executor ;
216
-
255
+
217
256
// Set the time zone parameter
218
257
conn . execute (" SET TIME ZONE LOCAL;" ). await
219
258
@@ -420,3 +459,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
420
459
[ @nrjais ] : https://github.com/nrjais
421
460
[ @qtbeee ] : https://github.com/qtbeee
422
461
[ @xiaopengli89 ] : https://github.com/xiaopengli89
462
+ [ @meh ] : https://github.com/meh
463
+ [ @shssoichiro ] : https://github.com/shssoichiro
464
+ [ @Nilix007 ] : https://github.com/Nilix007
465
+ [ @g-s-k ] : https://github.com/g-s-k
466
+ [ @blackwolf12333 ] : https://github.com/blackwolf12333
467
+ [ @xyzd ] : https://github.com/xyzd
468
+ [ @hasali19 ] : https://github.com/hasali19
0 commit comments