Austin Bonander
3ec35e06bd
WIP pool changes
2025-12-24 23:05:17 -08:00
Joey de Waal
469f22788e
breaking: add SqlStr ( #3723 )
...
* refactor: introduce `SqlSafeStr` API
* rebase main
* Add SqlStr + remove Statement lifetime
* Update the definition of Executor and AnyConnectionBackend + update Postgres driver
* Update MySql driver
* Update Sqlite driver
* remove debug clone count
* Reduce the amount of SqlStr clones
* improve QueryBuilder error message
* cargo fmt
* fix clippy warnings
* fix doc test
* Avoid panic in `QueryBuilder::reset`
* Use `QueryBuilder` when removing all test db's
* Add comment to `SqlStr`
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* Update sqlx-core/src/query_builder.rs
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* Add `Clone` as supertrait to `Statement`
* Move `Connection`, `AnyConnectionBackend` and `TransactionManager` to `SqlStr`
* Replace `sql_cloned` with `sql` in `Statement`
* Update `Executor` trait
* Update unit tests + QueryBuilder changes
* Remove code in comments
* Update comment in `QueryBuilder`
* Fix clippy warnings
* Update `Migrate` comment
* Small changes
* Move `Migration` to `SqlStr`
---------
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2025-07-07 00:35:54 -07:00
Joey de Waal
0f891a3c56
Remove unnecessary boxfutures ( #3525 )
...
* Remove `BoxFuture`'s from `Connection` and `ConnectOptions`
* Remove `BoxFuture`'s for `MigrateDatabase`
* Remove `BoxFuture`'s for `TransactionManager`
* Remove `BoxFuture`'s for `TestSupport`
* Remove `BoxFuture`'s from `PgPoolCopyExt`
* Clippy fixes
* Box timeout future in debug mode
2025-07-04 17:53:46 -07:00
Paolo Barbolini
764ae2f702
chore: replace once_cell OnceCell/Lazy with std OnceLock/LazyLock ( #3709 )
2025-06-17 16:38:02 -07:00
kildrens
a9dfb4f2c1
Avoid privilege requirements by using an advisory lock in test setup (postgres). ( #3753 )
...
* feat(sqlx-postgres): use advisory lock to avoid setup race condition
* fix(sqlx-postgres): numeric hex constants not supported before postgres 16
2025-02-20 18:13:56 -08:00
Sam Lyon
8cdad44366
docs: add some missing backticks ( #3749 )
...
* add ending backticks to starting backticks that were missing them
* fix table alignment
2025-02-19 15:23:45 -08:00
Andreas Liljeqvist
a83395a360
Fix: nextest cleanup race condition ( #3334 )
...
* remove unused trait fn `cleanup_test_dbs`
* *wip* solve test cleanup race condition
* check for exactly 63 chars in database name
* move base64 dependency
* change
* Use url_safe base64 encoding
* Assert quoting for database name
* refactor
* add mysql support?
* borrow
* fix borrows
* ensure quoting
* re-add trait cleanup_test_dbs
* fix mysql insert
* cargo lock
* use actual field
* cleanup converted path in sqlite
* replace dashes with underscore in db name
* refactor: remove redundant path conversion in cleanup_test and add db_name method
---------
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2025-01-23 17:36:55 -08:00
Austin Bonander
bae083cf79
fix: clippy warnings
2024-06-13 13:11:36 -07:00
Fernando Gonçalves
3c2471e2dc
fix: sqlx::macro db cleanup race condition by adding a margin to current timestamp ( #2640 )
...
* fix: sqlx::macro db cleanup race condition by adding a margin to current timestamp
* feat: increase margin to 2 seconds
2023-10-11 16:03:53 -07:00
Yuri Astrakhan
a824e8468c
Cleanup format arguments ( #2650 )
...
Inlined format args make code more readable, and code more compact.
I ran this clippy command to fix most cases, and then cleaned up a few trailing commas and uncaught edge cases.
```
cargo clippy --bins --examples --benches --tests --lib --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2023-07-31 13:27:04 -07:00
Philip Kannegaard Hayes
1227d5d168
fix: ensure fresh test db's aren't accidentally deleted by do_cleanup ( #2454 )
...
If the first test thread is a bit slow after it acquires the
`DO_CLEANUP` permit, it can accidentally delete a fresh test db created
by another thread right before that other thread has a chance to open
its connection.
This fix simply records the current timestamp _before_ we acquire the
`DO_CLEANUP` permit and only cleans up test db's created before then.
2023-05-04 13:23:04 -07:00
Austin Bonander
b5312c3b6f
Break drivers out into separate crates, clean up some technical debt ( #2039 )
...
* WIP rt refactors
* refactor: break drivers out into separate crates
also cleans up significant technical debt
2023-02-21 13:25:25 -08:00