Commit graph

2513 commits

Author SHA1 Message Date
Austin Bonander
06fc272c2b fix(sqlite): forward optional features correctly 2024-08-23 23:39:32 -07:00
Austin Bonander
2ab7565bd8 chore: configure clippy cast lints at workspace level 2024-08-23 23:39:32 -07:00
Austin Bonander
1f669ae996 fix(mysql): audit for bad casts 2024-08-23 23:39:32 -07:00
Austin Bonander
e99f0fa5b6 chore(mysql): deny bad-cast lints 2024-08-23 23:39:32 -07:00
Austin Bonander
1f3db8201d fix(mysql): fallout from ec5326e5 2024-08-23 23:39:32 -07:00
Austin Bonander
53766e4659 refactor(postgres): make better use of traits to improve protocol handling 2024-08-23 23:39:32 -07:00
Austin Bonander
9b3808b2d5 refactor: rename sqlx_core::io::{Encode, Decode} for clarity 2024-08-23 23:39:32 -07:00
Austin Bonander
01186a062a fix: audit sqlx_postgres::types::array for bad casts 2024-08-23 23:39:32 -07:00
Austin Bonander
bf13a7706b fix: audit sqlx_postgres::types::hstore for bad casts 2024-08-23 23:39:32 -07:00
Austin Bonander
2a9b85889e fix: audit sqlx_postgres::type::int for bad casts 2024-08-23 23:39:32 -07:00
Austin Bonander
52c34a897a fix: audit PgNumeric and usages for casts involving sign loss 2024-08-23 23:39:32 -07:00
Austin Bonander
cac914fa21 fix: audit sqlx_postgres::types::rust_decimal for casts involving sign loss 2024-08-23 23:39:32 -07:00
Austin Bonander
ea2926135f fix: audit sqlx_postgres::types::bit_vec for casts involving sign loss 2024-08-23 23:39:32 -07:00
Austin Bonander
af9cce726b fix: audit PgValueRef::get() and usage sites for bad casts 2024-08-23 23:39:32 -07:00
Austin Bonander
26c85240fc chore: run cargo fmt 2024-08-23 23:39:32 -07:00
Austin Bonander
d8cb7a2cd6 fix: audit sqlx_postgres::types::cube for overflowing casts 2024-08-23 23:39:32 -07:00
Austin Bonander
8360d48296 fix: audit sqlx_postgres::types::chrono for overflowing casts 2024-08-23 23:39:32 -07:00
Austin Bonander
112b4a84b5 fix: audit sqlx_postgres::types::time for overflowing casts 2024-08-23 23:39:32 -07:00
Austin Bonander
fa5039d6aa fix: audit sqlx_postgres::types::bit_vec for overflowing casts 2024-08-23 23:39:32 -07:00
Austin Bonander
544fff54e2 fix: audit sqlx_postgres::types::rust_decimal for overflowing casts 2024-08-23 23:39:32 -07:00
Austin Bonander
16f8b1900d fix(postgres): prevent integer overflow when binding arguments 2024-08-23 23:39:32 -07:00
Austin Bonander
9ec09fb789 fix: tests in sqlx-postgres 2024-08-23 23:39:32 -07:00
Austin Bonander
b4e7a2fe7d fix(ci): enable unit-tests for all relevant packages 2024-08-23 23:39:32 -07:00
Austin Bonander
6f2905695b
doc: link to Ecosystem wiki page in README 2024-08-13 14:09:19 -07:00
Kol Influence
fac53b05a4
correct spelling of MySqlConnectOptions::no_engine_substitution() (#3421)
* Update connect.rs

* Update mod.rs

correct naming no_engine_substitution

* Update mod.rs

* Update mod.rs

* Update mod.rs

* Update mod.rs
2024-08-12 00:13:37 -07:00
Cosmo André
e783f9d47c
Update version to 0.8 in README (#3417)
* Changed version from 0.7 to 0.8

* Fixed version
2024-08-09 00:50:24 -07:00
Dirkjan Ochtman
a892ebc6e2
Upgrade to rustls 0.23 (#3399) 2024-08-04 16:39:13 -07:00
cycraig
4acecfc636
fix(sqlx-cli): do not clean sqlx during prepare (#2786)
* fix(cli): do not clean sqlx during prepare

* feat(cli): only clean dependencies with new --all flag for prepare
2024-08-01 15:36:42 -07:00
Clark Kampfe
ff0252d4c2
sqlite: fix inconsistent read-after-write (#3354)
* sqlite: fix inconsistent read-after-write

fetch_one/fetch_optional

* try pushing fetch_optional early-return into worker

* run cargo fmt

* fix "it_can_execute_multiple_statements" test failure

* use Option<usize> instead of bespoke enum for rows returned
2024-08-01 13:27:01 -07:00
Denis Otkidach
572e2a4ed5
fix(cli): typo in error for required DB URL (#3389) 2024-07-29 17:28:41 -07:00
Frank Elsinga
fd4cb99fc7
chore(examples):Migrated the pg-chat example to ratatui (#3385)
* migrated the pg-chat example to ratatui

* fixed formatting mistake
2024-07-29 04:35:27 -07:00
Frank Elsinga
cc481827d9
fixed deprecation warnings (#3384) 2024-07-27 18:04:20 -07:00
Frank Elsinga
49d5dd7f42
bumped to libsqlite3-sys=0.30.1 (#3382) 2024-07-27 17:59:00 -07:00
Frank Elsinga
e089d2fb55
bumped cargo_metadata to v0.18.1 (#3386) 2024-07-27 16:19:26 -07:00
tottoto
4ce181f869
chore: replace structopt with clap in examples (#3380) 2024-07-27 02:51:20 -07:00
Austin Bonander
6651d2df72
Fix CI after Rust 1.80, remove dead feature references (#3381)
* 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
2024-07-26 23:15:32 -07:00
Austin Bonander
1e526a2bbf
doc: hide spec_error module (#3376)
The `spec_error` module implements the autoref specialization hack that's used in a single place in the derive macros. It wasn't meant to be a public API.

Given how arcane it must appear, I doubt anyone's tried using it outside of this project anyway.
2024-07-25 03:13:02 -07:00
Yuta Kobayashi
f2fea27cba
Fix encoding and decoding of MySQL enums in sqlx::Type (#3371) 2024-07-25 02:47:36 -07:00
Hamir Mahal
7cfbb24ee3 fix: usage of node12 in SQLx action 2024-07-24 22:27:32 -07:00
Austin Bonander
80fa6d1e45
fix(changelog): add missing entry for #2697 2024-07-23 10:53:51 -07:00
Austin Bonander
da0ffd7dcf chore: bump version to 0.8.0 2024-07-22 18:36:35 -07:00
Austin Bonander
9e1aa748c9 chore: prepare changelog entry for 0.8.0 2024-07-22 18:36:35 -07:00
Austin Bonander
c90a7fff49 fix: enable clock and std features of chrono for the workspace
fixes #3332
2024-07-22 18:36:35 -07:00
Jason Ish
c50572eef2
fix: sqlite update_hook char types (#3288)
Use "c_char" instead of "i8" as it resolves to the correct string type
on different architectures.

Fixes: #3287
2024-07-22 15:26:47 -07:00
Leon Lux
940d9fb994
Add example on how to use Transaction as Executor (#3311)
* add example using Transaction as Executor to docs

* change tx.as_mut() to &mut *tx
2024-07-22 15:15:57 -07:00
SrGesus
eaad7b2c9a
doc: Minor rust docs fixes (#3312)
* 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
2024-07-20 12:59:52 -07:00
Austin Bonander
4fc5b30d65
breaking: fix name collision in FromRow, return Error::ColumnDecode for TryFrom errors (#3356)
* chore: create regression test for #3344

* fix(derives): use a parameter name that's less likely to collide

* breaking(derives): emit `Error::ColumnDecode` when a `TryFrom` conversion fails in `FromRow`

Breaking because `#[sqlx(default)]` on an individual field or the struct itself would have previously suppressed the error. This doesn't seem like good behavior as it could result in some potentially very difficult bugs.

Instead of using `TryFrom` for these fields, just implement `From` and apply the default explicitly.

* fix: run `cargo fmt`

* fix: use correct field in `ColumnDecode`
2024-07-19 23:03:47 -07:00
Frank Elsinga
b37b34bd04
chore:added a testcase for sqlx migrate add ... (#3352) 2024-07-19 18:50:18 -07:00
Jos Ahrens
543395d80a
fix: build script new line at eof (#3353)
When generating the build script, it will
fail `cargo fmt -- --check` because it is
missing a new line at the end of the file.
2024-07-19 14:53:45 -07:00
Kobus Ellis
4683cc34e5
Add support for PostgreSQL HSTORE data type (#3343)
* Add support for PostgreSQL HSTORE data type

* Changes to make the future evolution of the API easier

* Fix clippy lints

* Add basic documentation
2024-07-19 14:33:16 -07:00