Sean Aye
2aab4cd237
Add json(nullable) macro attribute ( #3677 )
...
* add json optional attribute parser and expansion
* rename attribute
* add test
* fix tests
* fix lints
* Add docs
2025-01-28 10:56:33 -08: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
Marco Cameriero
9463b7592f
Add JSON support to FromRow
derive ( #2121 )
...
* Add `json` attribute to `FromRow` derive
* Add docs and fix formatting
2023-07-31 12:52:42 -07:00
Marco Cameriero
9f1f682285
Allow using complex types in try_from
when deriving FromRow
( #2115 )
...
* Use `syn::Type` instead of `syn::Ident` to parse the value of `#[sqlx(try_from = "...")]`
* Fix broken test after rebase
2023-02-21 13:25:25 -08: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
zz
ddffaa7dde
feat: Add try_from
attribute for FromRow
( #1081 )
2022-09-06 21:04:11 -07:00
Atkins
9f7205e80f
Fix GitHub Actions and integration test ( #1346 )
...
* fix test suite
* rustfmt
* need Row
* test: fix integration test scripts and update the upstream supported databases
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* ci(actions): update supported databases
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* ci(actions): use `pg_isready` instead of `sleep` to avoid error cause by database not ready
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* feat(core): add `trait PgConnectionInfo` for connection parameter status from server
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* test(postgres): fix integration test for postgres
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* test(mysql): fix integration tests
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* ci(actions): test database against the oldest and newest supported versions
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* docs(core): document `trait PgConnectionInfo`
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
Co-authored-by: Montana Low <montanalow@gmail.com>
2021-07-28 14:00:34 -07:00
Austin Bonander
7c32928ebc
feat(macros): implement query_scalar!()
and variants
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-20 22:23:04 -08:00
Raphaël Thériault
ced09e0545
Support using both nullability and type overrides ( #549 )
...
* Make it possible to use both nullability and type overrides
* Fix override parsing lookahead logic
* Update column override tests
* Support nullability overrides with wildcard type overrides
* Fix tests
* Update query! overrides docs
* Remove last bits of macro_result!
* rustfmt
2020-07-27 00:43:35 -07:00
Ryan Leckey
0def87b689
fix(derives): lift requirement of Copy + Clone on weak enums
2020-07-04 03:14:42 -07:00
Ryan Leckey
6a251efb65
fix(mysql): enum type derive and column overrides need to deref before eq
2020-07-04 02:59:56 -07:00
Austin Bonander
f2515e2472
feat(macros): support nullable column override
2020-06-21 06:06:53 -07:00
Austin Bonander
029ba24cad
chore(macros): add tests for bind parameter overrides
2020-06-21 06:06:53 -07:00
Austin Bonander
1a250976ba
chore(macros): add test for column overrides for MySQL
2020-06-21 06:06:53 -07:00
Austin Bonander
80b4e2fca6
fix(macros): reintroduce and fix macro tests for MySQL
2020-06-05 21:02:24 -07:00