Commit graph

2500 commits

Author SHA1 Message Date
Gnome!
3e7aa6bedf
Bump deps that do not need code changes (#3165) 2024-04-06 00:07:36 -07:00
Maciej Flak
45b5b61d7b
Add version information for failed cli migration (#3129) (#3130) 2024-04-04 21:45:21 -07:00
Austin Bonander
0aae849657
fix(ci): use docker compose instead of docker-compose (#3167)
https://github.com/actions/runner-images/issues/9557
2024-04-02 16:15:09 -07:00
iamjpotts
d600ec0293
feat(logging): Log acquires from connection pool (#3073)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2024-04-01 19:35:50 -07:00
Paolo Barbolini
e0a72cf8f2
Drop urlencoding dependency (#3162) 2024-03-30 16:17:04 -07:00
Cody Casterline
352b02de6a
Bump libsqlite3-sys to v0.28 (#3148)
This includes SQLite v3.45(.1), which includes new JSONB functionality.
2024-03-30 15:59:51 -07:00
Austin Bonander
02c68a46c7
refactor: lift type mappings into driver crates (#2970)
Motivated by #2917
2024-03-30 15:52:52 -07:00
Luiz Carvalho
1c7b3d0751
feat: new derive feature flag (#3113)
* feat: new derive feature flag

* doc: add new derive flag to readme

* fix: macros feature flag cfg
2024-03-30 15:24:56 -07:00
Austin Bonander
7102a7a254
feat: add MySqlTime, audit mysql::types for panics (#3154)
Also clarifies the handling of `TIME` (we never realized it's used for both time-of-day and signed intervals) and adds appropriate impls for `std::time::Duration`, `time::Duration`, `chrono::TimeDelta`
2024-03-30 11:49:12 -07:00
Bogdan Mircea
1f6642cafa
Reorder attrs in sqlx::test macro (#3123) 2024-03-27 20:20:41 -07:00
Austin Bonander
59d5ba606e
fix(sqlite): delete unused ConnectionHandleRaw type (#3146) 2024-03-22 22:15:37 -07:00
Austin Bonander
0b91ea68e5
fix(tests): extend fresh-connection threshold
This assert is failing with durations _just_ over the line, suggesting a timing issue.
2024-03-22 15:50:54 -07:00
Bogdan Mircea
e0a1f1633c
Removed Send bound from arg binding (#2960) 2024-03-14 12:39:02 -07:00
Tyler Hawkes
b607251fc4
Implement PgHasArrayType for all references (#2869) 2024-03-14 12:38:19 -07:00
Daniel
0d0dddf1d0
Constrain cyclic associated types (#2702)
Add bounds such that cyclic associated types are equal to themselves.
```
<T as Connection>::Database as Database>::Connection == T
<T as ConnectOptions>::Connection as Connection>::Options == T
<T as Row>::Database as Database>::Row == T
<T as Column>::Database as Database>::Column == T
<T as Value>::Database as Database>::Value == T
```
2024-03-14 12:37:28 -07:00
nitn3lav
9ba488c831
Generic Associated Types in Database, replacing HasValueRef, HasArguments, HasStatement (#2973)
* HasValueRef, HasArguments, HasStatement -> Database GATs

replace the associated types from the generic traits
`HasValueRef<'r>`, `HasArguments<'q>` and `HasStatement<'q>`
with generic associated types in `Database`

* fixup after rebase

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2024-03-14 12:35:52 -07:00
Jesse Wang
936744dfd6
Fix describe on PostgreSQL views with rules (#2736)
* fix postgres describe on multiple explains

* inline the first explain using smallvec

* fix: regenerate `Cargo.lock`

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2024-03-14 12:05:44 -07:00
Luiz Carvalho
4c6830210b chore: remove deprecation notice for ascription 2024-03-14 12:03:40 -07:00
Luiz Carvalho
8f926e590c refac: rebase syn 2 changes 2024-03-14 12:03:40 -07:00
Guilherme Favero Ferreira
c5357f18e5 bump bigdecimal version 2024-03-11 23:57:07 -07:00
Luiz Carvalho
f316b0d435 fix(macros): only enable chrono when time is disabled 2024-03-11 22:38:47 -07:00
Austin Bonander
30db1f8ffc chore: bump version to 0.8.0-alpha.0 2024-03-11 22:38:24 -07:00
Austin Bonander
635dba5b26 fix: deprecation in postgres::types::chrono 2024-03-11 22:01:04 -07:00
Austin Bonander
a2b89d70a7 fix: deprecation warnings in sqlite::types::chrono, document DATETIME behavior 2024-03-11 22:01:04 -07:00
Austin Bonander
248d6170a7 chore: prepare 0.7.4 release 2024-03-11 22:01:04 -07:00
Austin Bonander
d005111494 fix: better I/O errors when migrate!() cannot read a file 2024-03-06 22:20:59 -08:00
Austin Bonander
24be262165 fix: restore Migrator to the public API 2024-03-06 22:20:59 -08:00
Joe
bbfd0d711a
fix: AnyRow not support PgType::Varchar (#2976) 2024-03-05 19:47:15 -08:00
Lílian
b29eab0439
feat: add to_url_lossy to connect options (#2902)
* feat: add get_url to connect options

Add a get_url to connect options and implement it for all needed types;
include get_filename for sqlite. These changes make it easier to test
sqlx.

* refactor: use expect with message

* refactor: change method name to `to_url_lossy`

* fix: remove unused imports
2024-03-05 19:46:49 -08:00
Austin Bonander
34860b7f99 fix(ci): just cfg-out the whole tests/sqlite/sqlcipher.rs 2024-03-05 18:33:56 -08:00
Austin Bonander
791a7f5417 doc(pg): document behavior of bigdecimal and rust_decimal with out-of-range values
also add a regression test
2024-03-05 18:33:56 -08:00
Austin Bonander
e5c18b354e fix: gate sqlcipher testing behind cfg to make development less annoying 2024-03-05 18:33:56 -08:00
Léo Gaspard
dfb60141bd fix: do not panic when binding a large BigDecimal 2024-03-05 18:33:56 -08:00
Rafael Guerreiro
e8fc35a5a4 Remove sha1 because it's not being used in postgres 2024-03-05 18:10:33 -08:00
Carter
664dbdf54b docs: update example for PgConnectOptions 2024-03-04 21:36:07 -08:00
Austin Bonander
c78425b3ac fix(ci): disable mariadb_verylatest pass for RusTLS
see: #3091
2024-03-04 21:09:49 -08:00
Austin Bonander
c32809af91 fix(migrate): improve error message when parsing version from filename
supercedes #2906
2024-03-04 21:09:49 -08:00
Mirek Klimos
b4f6596b06
Improve max_lifetime handling (#3065)
* Check max lifetime in return_to_pool, not on acquire

* Improve checks in backgrand maintenance task

* add tests

* adjust test to fix
2024-03-04 16:39:59 -08:00
darkecho731
27a49914ad
feat(mysql): allow to connect with mysql driver without default behavor (#3037)
* feat(mysql): provide options to disable default connection settings after connecting

* style(mysql): remove unecessary newlines and run rustfmt

* feat(mysql): allow to pass a custom timezone to the database after connecting
docs(mysql): improve docs for options set_names and no_engine_substitution
2024-02-24 19:30:50 -08:00
ciffelia
8c43b8c7bc
Change the name of "inner" function generated by #[sqlx::test] (#3072) 2024-02-24 17:02:25 -08:00
Matt Fellenz
b615d2a826
Use create_new instead of atomic-file-write (#2914)
* Use `create_new` instead of `atomic-file-write`

This provides the same functionality but without temporary files, platform-specific code, fragility of `O_TMPFILE` support, and an extra dependency.

* Properly handle acceptable failure cases

* Consider `PermissionDenied` as acceptable

Apparently this can occur on Windows.

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2024-02-24 01:49:51 -08:00
Vraj Shah
02f196b4ac
fix: link to correct version in first-migration message (#2900)
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2024-02-18 20:20:29 -08:00
Austin Bonander
ca518b7185
feat: add raw_sql API (#3007)
This is meant to be much easier to discover than the current approach of directly invoking `Executor` methods.

In addition, I'm improving documentation for the `query*()` functions across the board.
2024-02-18 15:38:23 -08:00
Mirek Klimos
dd900e50b6
Optimize SASL auth in sqlx-postgres (#3050)
* Optimize SASL auth in sqlx-postgres

* fix formatting
2024-02-16 16:32:31 -08:00
zoomiti
a1e4984c6c
fix: spans in sqlite tracing (#2876) (#3056) 2024-02-15 22:27:22 -08:00
Mirek Klimos
4c057a0628
Set TCP_NODELAY option on TCP sockets (#3055) 2024-02-15 22:26:52 -08:00
iamjpotts
d7cbf940c3
feat(logging): Add numeric elapsed time field elapsed_secs as f64 (#3004)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2024-02-12 13:51:55 -08:00
Ian Gilfillan
84d576004c
Update docs to reflect support for MariaDB data types (#3026) 2024-01-30 13:24:19 -08:00
iamjpotts
978bd50a57
chore: Ignore .sqlx folder created by running ci steps locally (#3008)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2024-01-30 13:23:58 -08:00
Paweł Urbanek
0299959ca6
Add default implementation for PgMoney (#3018) 2024-01-30 13:23:45 -08:00