iamjpotts
81526898d4
refactor(core): Remove lifetime parameter from Arguments trait ( #3960 )
...
* refactor(core): Remove lifetime parameter from Arguments trait
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
* refactor(core): Also relax lifetime of argument passed to Query::bind and Query::try_bind
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
---------
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2025-09-13 21:47:45 -07: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
Paolo Barbolini
df47ffedd2
Replace some more futures_util APIs with std variants ( #3874 )
2025-06-15 15:18:39 -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
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
Ophir LOJKINE
20d61f4271
query_as: don't stop stream after decoding error ( #1887 )
...
* query_as: don't stop stream after decoding error
Fixes https://github.com/launchbadge/sqlx/issues/1884
When a single row cannot be converted to the target type of query_as,
it should not prevent the library user from accessing the other rows
Otherwise, the user cannot access all query results in query_as.
* use union in tests to maximize db compatibility
2022-06-01 19:18:18 -07:00
Ryan Leckey
0b2844bf39
feat(any): implement ColumnIndex<AnyRow> for &str to enable FromRow for the Any driver
...
closes #464
2020-07-02 23:28:53 -07:00
Ryan Leckey
a7117dd71b
feat(any): introduce the Any database driver which enables choosing the database driver at runtime
2020-06-27 04:07:40 -07:00