* fix(postgres): make `PgStream::recv_unchecked()` cancel-safe
* fix(postgres): make `PgListener` close the connection on-error
* fix: incorrect math in `BufferedSocket::read_buffered()`
* add information and example on using json in query macros
* run cargo format
* add missing bracket to docs of json
* wrap docs in hidden async function
* change no_run to ignore
* fix(ci): update workflows/examples.yml
* Removed archived `actions-rs` actions
* Upgraded `Swatinem/rust-cache`, `actions/checkout`, `actions/download-artifact`, `actions/upload-artifact`
* chore: deprecate `AnyKind`
* fix: remove dead references to DB features in `sqlx-core`
This reactivates a couple of tests that had stopped working.
* chore(ci): move sqlx-cli checks to their own workflow
* fix(ci): remove remaining `uses: actions-rs/cargo`
* fix warnings
* chore: add titles to sqlx-cli jobs
* fix warnings (2)
* fix error in pool example
* fix warnings (3)
* fix query_builder test
* fix: don't run CLI tests on Windows
* chore: upgrade `rust-toolchain` to 1.80
* fix(postgres): fix missing Tokio specialization in `PgCopyIn`
Caught by the new `unexpected_cfgs` lint.
* fix new warnings
* Fixed some rust docs intra-doc non functioning links
* Minor tweaks
* Added warning for MSSQL not being functional yet
* Fixed requested changes
* Readded missing time
* Aligned table
* feat: support `NonZero*` scalar types
This commits adds `Type`, `Encode`, and `Decode` impls for all the
`NonZero*` types from the standard library. They are implemented as
direct proxies to their primitive counterparts, except that when
decoding, the values are checked to not be zero.
* fixup!: remove `non-zero` cargo feature
* fixup!: make `non-zero` module private
* fixup!: rebase and fix trait impls
* Make encode and encode_by_ref fallible
This only changes the trait for now and makes it compile, calling .expect() on all users. Those will be removed in a later commit.
* PgNumeric: Turn TryFrom Decimal to an infallible From
* Turn panics in Encode implementations into errors
* Add Encode error analogous to the Decode error
* Propagate decode errors through Arguments::add
This pushes the panics one level further to mostly bind calls. Those will also be removed later.
* Only check argument encoding at the end
* Use Result in Query internally
* Implement query_with functions in terms of _with_result
* Surface encode errors when executing a query.
* Remove remaining panics in AnyConnectionBackend implementations
* PostgreSQL BigDecimal: Return encode error immediately
* Arguments: Add len method to report how many arguments were added
* Query::bind: Report which argument failed to encode
* IsNull: Add is_null method
* MySqlArguments: Replace manual bitmap code with NullBitMap helper type
* Roll back buffer in MySqlArguments if encoding fails
* Roll back buffer in SqliteArguments if encoding fails
* Roll back PgArgumentBuffer if encoding fails
* fix: make resolve_blocking not take ownership of path
When using sqlx_macros_unstable the codepath taken further uses the path
variable and it is more convenient to not take ownership but instead
pass references to needed functions.
* fix: change &PathBuf to &Path in resolve_blocking
* test: add a failing test
* feat: add no_tx to migration struct
* feat: execute migration with no tx block
* fix: expected string literal compilation error
* test: update no tx to content comment
* refactor: use the sql comment instead of file name semantics
* docs: remove no_tx from file format comment
* fix: remove filename matches
* fix: messed up merge
* refactor: dedupe migration
* fix: move comment to where it makes sense
* fix: linter error
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
```
* 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>
* 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
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.
* 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