Commit graph

2376 commits

Author SHA1 Message Date
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
iamjpotts
235604fbce
chore(dev-deps): Upgrade env_logger from 0.9 to 0.11 (#3009)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2024-01-25 23:30:25 -08:00
iamjpotts
3946cc82db
chore(deps): Upgrade criterion to 0.5.1 (#3010)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2024-01-25 23:30:14 -08:00
Dorje Gilfillan
0e998ceccc
Added support to IpAddr with MySQL/MariaDB. (#3011)
* Added support for IpAddr with MySQL/MariaDB

* Added IpAddr to mysql/types documentation
2024-01-25 23:30:02 -08:00
Paweł Urbanek
af31d5059d
Add default implementation for PgInterval (#3013) 2024-01-25 23:29:51 -08:00
iamjpotts
5890afe95b
chore(deps): Replace unmaintained tempdir crate with tempfile (#3006)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2024-01-22 20:16:06 -08:00
Luiz Carvalho
a7862ae416
feat: expose connect options fields (#2891)
Exposes some of the main fields for PgConnectOptions
and MySqlConnectOptions. Exposed fields include: host,
port, socket, ssl mode, application name, and charset.
2024-01-20 18:21:34 -08:00
Lars Schumacher
29dcd44a6a
fix(mysql): Close prepared statement if persistence is disabled (#2905)
* close prepared statement if persistence or statement cache are disabled

* add tests
2024-01-20 18:20:04 -08:00
Thomas de Zeeuw
31e541ac7a
Fix handling of deferred constraints for PostgreSQL (#2913) 2024-01-20 02:36:06 -08:00
Ian Gilfillan
9d2c52178d
Update README to clarify MariaDB support (#3001) 2024-01-19 19:46:10 -08:00
Austin Bonander
fd53e95ff9
doc(FAQ): add entry explaining prepared statements (#2997) 2024-01-17 19:16:02 -08:00
takenoko-gohan
609fcc33e3
Update ahash to 0.8.7 (#2996) 2024-01-17 19:15:51 -08:00
kshramt
b4269b7c86
Support query! for cargo-free systems (#2927)
Co-authored-by: kshramt <kshramt@example.com>
2024-01-17 19:15:22 -08:00
Dawson
2cc3e0f90b
Minor fixes (#2955)
* doc link fix
variable declaration moved for better readability

* migration version abstraction
2024-01-16 13:49:25 -08:00
Austin Bonander
cdcb2f0f2b
Merge pull request #2989 from joshtriplett/sqlx-core-no-dotenvy
sqlx-core: Remove dotenvy dependency
2024-01-16 13:48:25 -08:00
Josh Triplett
a5c1cd021c sqlx-core: Remove dotenvy dependency
sqlx-core doesn't use dotenvy. Removing it means that users who only
depend on sqlx with sqlite and default-feature = false don't need it.
2024-01-14 21:56:54 -08:00
Austin Bonander
982c014f54
Merge pull request #2919 from shengsheng/fix_doc
fix duplicate "`" in FromRow "default" attribute doc comment
2024-01-05 21:17:18 -08:00
Austin Bonander
7044a92858 fix: fix new warnings that cropped up 2024-01-05 19:05:16 -08:00
Austin Bonander
4c22994605 fix(core): export net::socket::WriteBuffer 2024-01-05 18:55:34 -08:00
Austin Bonander
9b0a09387c
Update README.md 2024-01-05 18:51:27 -08:00
Austin Bonander
ea4703ea64
Merge pull request #2932 from tsing/fix-copy-in
fix(postgres): avoid unnecessary flush in PgCopyIn::read_from
2024-01-05 18:36:08 -08:00
Austin Bonander
2d397a56ca
Merge pull request #2963 from tadghh/patch-2
Fixed ReadMe badge styling
2024-01-05 18:35:46 -08:00
Tadgh Henry
9c45eaa062
Fixed badge styling
whitespace is being interpreted by the a tag causing blue hyperlinks to show up between the badges.
2024-01-02 12:49:53 -06:00
Jesse Wang
91c6e6668b
fix(postgres): avoid unnecessary flush in PgCopyIn::read_from 2023-12-12 22:53:00 +13:00
Arthur
7becff70ba fix duplicate "`" in FromRow "default" attribute doc comment 2023-12-07 14:36:00 +08:00