* fix(postgres): make `PgStream::recv_unchecked()` cancel-safe
* fix(postgres): make `PgListener` close the connection on-error
* fix: incorrect math in `BufferedSocket::read_buffered()`
* fails to compile as size_of is not found in scope
* keep scoping consistent with other type modules
* fmt fixes
---------
Co-authored-by: kdesjard <kristian.desjardins@nrcan-rncan.gc.ca>
* 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
* fix(postgres): don't panic if `M` or `C` Notice fields are not UTF-8
This has been observed with an old version of PostgreSQL (11.0.4)
running on Windows Server 2016 with windows-1252 encoding and French
locale.
This change replaces invalid UTF-8 fields with a default string, so the
other fields can still be read if they are valid.
* Revert "fix(postgres): don't panic if `M` or `C` Notice fields are not UTF-8"
This reverts commit 362ca98bbd.
* Check that Notice M and C fields are valid UTF-8
Otherwise, we return the invalid UTF-8 error to avoid panicking later.
* feat: add cube
* docs: cube docs
* docs: update readme
* fix: cube is now not feature flagged
* fix: formatting
* fix: typeo for PgCube vs Cube
* fix: correct types
* fix: postgres only types for cube
* fix: cube readme
* fix: dont unwrap cubes
* fix: typo on interval
* fix: zero volume cube array
* fix: return type
* fix: update tests
* fix: run with one test type
* fix: log bytes in error
* fix: typo in test
* fix: log bytes for failed length
* fix: string deser
* docs: remove cube from readme
* fix: int to float
* fix: trim floats
* fix: exttra test
* fix: type safe into vectors
* fix: improve error messages
* docs: remove comments
* fix: front load most important logic and const at start
* fix: extract constants
* fix: flags
* fix: avoid redundant buffer creation and use FromStr trait
* fix: handle serializing
* test: cube vec test
* fix: no array cube test
* fix: update test with array for cube
* fix: dont use try from for u8
* fix: conditionally remove padding
* fix: conditional trimming
* fix: idiomatic trimming
* fix: linting
* fix: remove whitespace
* fix: lower case array
* fix: spacing input
* test: one more vec test
* fix: trim square brackets in case they are using postgres spec page
* fix: result types
* fix: format
* fix: box error
* fix: the borrow produces a value
* fix: self serialise
* chore: merge main
* fix: borrow
* fix: clippy
---------
Co-authored-by: James Holman <james.holman@betashares.com.au>
The names for the SSL mode options were incorrect, added test for making
sure the built url can be parsed to ensure internal consistency at
least. Also changed "ssl-mode" to "sslmode" as it seems more standard
and sqlx can parse both.
* 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