Commit graph

2500 commits

Author SHA1 Message Date
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
Austin Bonander
929af41745
Merge pull request #2898 from Vrajs16/fix-docs
Fixed docs
2023-11-25 11:01:48 -08:00
Vraj Shah
e214a08ede Fixed docs 2023-11-25 10:11:00 -05:00
Austin Bonander
c55aba0dc1
Merge pull request #2895 from launchbadge/release/0.7.3
0.7.3 release
2023-11-22 18:23:16 -08:00
Austin Bonander
b4cce67b83 fix(changelog): correct release date for 0.7.3
also fix formatting for 0.6.3 cause it was bugging me
2023-11-22 18:11:58 -08:00
Austin Bonander
213ecd743c chore: upgrade libsqlite3-sys 2023-11-22 17:55:04 -08:00
Austin Bonander
31d402b469 chore: prepare 0.7.3 release 2023-11-22 17:43:46 -08:00
Austin Bonander
9fc9e7518e
feat: Text adapter (#2894) 2023-11-22 17:06:47 -08:00
Vraj Shah
62f82cc43a
Fixed force dropping bug (#2892) 2023-11-21 12:42:08 -08:00
Vraj Shah
fda415927a
Sqlx Cli: Added force flag to drop database for postgres (#2873)
* Updated ahash so it can compile on mac

* Updated MigrateDatabase Trait + related functions

* Postgres force drop database flag impl

* Update migrate.rs

* Reverted MigrateDatabase Trait

* Update migrate.rs

* Update migrate.rs

* Added force drop database fn impl

* Add Migrate Error

* Fixed changed function name
2023-11-21 11:11:08 -08:00
Austin Bonander
ed1b030e91
doc(sqlite): cover lack of NUMERIC support (#2890) 2023-11-20 20:14:20 -08:00
Ferenc Tamás
d3a28d461f
Do not require db url for prepare (#2882)
* feat(cli): do not require db url

* chore: remove unused import

* fix(cli): do not always pass DATABASE_URL

* fix(cli): check db when DATABASE_URL is provided
2023-11-20 20:11:23 -08:00
Austin Bonander
979a55da9d
feat: use specific message for slow query logs (#2880)
closes #2669
2023-11-15 20:08:09 -08:00
Roberto Ripamonti
16eeea8611
Add fixtures_path in sqlx::test args (#2545)
* feat: add fixtures_path

* test: add test for fixtures_path

* docs: expand test docs with fixtures_path

* test: add new test instead of co-opting and old one.

* feat: add explicit path operating mode for fixtures parameters and allow combining multiple fixtures parameters

* fix: require .sql extension for explicit path fixtures

* feat: add custom relative path style to fixtures argument

* fix: missing cfg feature

* docs: update

* fix: explicit fixtures styling checks for paths. Remove strict sql extension requirement for explicit path, they still need an extension. Add .sql extension to implicit fixtures style only if missing.

* style: cargo fmt

* docs: update documentation
2023-11-15 16:08:24 -08:00
Shift Right Once
9a6ebd0a74
Add a get_database method (#2871)
The Postgres implementation has this method. It is also
helpful for queries that require the current datbase name.
example:

```sql
SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_name = ? &&
table_schema = ?;
```
2023-11-15 15:22:15 -08:00
Vraj Shah
6ecb5831f4
Update Faq - Bulk upsert with optional fields (#2865)
* Update Faq - Bulk upsert with optional fields

* Applied Suggestion + fixed typo
2023-11-07 20:05:11 -08:00
Austin Bonander
ea8e0ab9c4
fix(sqlite): use AtomicUsize for thread IDs (#2864) 2023-11-07 11:58:15 -08:00
Cameron Braid
b91e4de2a4
fix: Make rust_decimal and bigdecimal decoding more lenient (#2688)
fixes https://github.com/readysettech/readyset/issues/143

When using readyset as a caching proxy - readyset returns a decimal with the following type info `MySqlTypeInfo { type: Decimal, flags: ColumnFlags(0x0), char_set: 33, max_size: Some(1024) }`

Currently rust_decimal and bigdecimal expect an exact match for the type info `MySqlTypeInfo { type: NewDecimal, flags: ColumnFlags(BINARY), char_set: 63, max_size: None }`

Therefore the following error  occurs when readyset sends a valid decimal type

```
    error occurred while decoding column "price": mismatched types; Rust type `core::option::Option<rust_decimal::decimal::Decimal>` (as SQL type `DECIMAL`) is not compatible with SQL type `DECIMAL`
```

This patch makes the `Type<MySql> for Decimal` more lenient by matching `MySqlTypeInfo` that has ColumType::Decimal |  ColumnType::NewDecimal to be parsed by both rust_decimal and bigdecimal types
2023-11-07 11:05:21 -08:00
Jason Klein
ee73c847a7
Fixed (#2838)
fmt
2023-11-06 17:36:31 -08:00
Yuri Astrakhan
ee3b94d726
Prevent warnings running cargo build (#2856)
When none of the features is enabled (default features), prevent compiler warnings.
2023-11-06 12:47:47 -08:00
Austin Bonander
cd39cb2e29
Create pull_request_template.md 2023-11-03 18:03:10 -07:00
Brian Heineman
92523f3629
Update extra_float_digits default to 2 instead of 3 (#2832) 2023-11-03 17:23:53 -07:00
Rico
220bf93dc2
Fix comment in sqlx migrate add help (#2847)
The old description for the `sequential` flag read "If set, use *timestamp* versioning".
I guess this was a simple copy-paste error.
2023-11-03 17:23:36 -07:00
Austin Bonander
9dbd52c9b3
fix(core): avoid unnecessary wakeups in try_stream!() (#2850)
fixes #2834
2023-11-03 17:23:25 -07:00
Austin Bonander
82fadce729 doc: inline reexports from drivers 2023-11-01 18:32:29 -07:00
Boris.Lok
e1ac388173
Provide fn PgConnectOptions::get_host(&self) (#2752)
Co-authored-by: boris <boris.lok@cienet.com>
2023-10-23 16:48:41 -07:00
Nano
ba87bf7473
Add impl FromRow for the unit type (#2827) 2023-10-23 16:45:33 -07:00