Chloe Ross
3885ae6ddf
fix: allow queries that select just void to pass through macros as ()
instead of struct { _1: () }
2020-07-31 04:14:48 -07:00
Austin Bonander
4e00ee050d
fix(macros): resolve clippy lint warning
...
cc https://github.com/rust-lang/rust-clippy/issues/5849
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-28 03:21:05 -07:00
Julius de Bruijn
1a59d3308a
Pg: Implementing BIT
and VARBIT
using BitVec
2020-07-27 03:36:44 -07:00
Ryan Leckey
22f1f93b79
chore: prepare sqlx v0.4.0-beta.1 and sqlx-cli v0.1.0-beta.1
2020-07-27 01:43:02 -07: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
d06de149a0
fix: get MatchBorrow type check working for references 3 deep
2020-07-26 23:07:12 -07:00
Ryan Leckey
ec0e84d8ac
feat(mysql): support reading and writing BIT via unsigned integers
...
e.g., BIT(64) is u64 and BIT(2) is u8
2020-07-26 19:42:32 -07:00
Ryan Leckey
51c5d82fec
fix: remove macro_result wrapper from migrate!
2020-07-26 18:06:06 -07:00
Ryan Leckey
f298eb3cf1
Merge remote-tracking branch 'raftario/embedded-migrations'
2020-07-26 18:03:59 -07:00
Ryan Leckey
86d41f17aa
Merge remote-tracking branch 'origin/ab/macro-refresh'
2020-07-26 17:54:23 -07:00
Danny Weinberg
bd6b6e0365
Make names match their corresponding styles
2020-07-24 07:25:29 -07:00
Danny Weinberg
036bd2a05d
Add SCREAMING_SNAKE_CASE rename_all option
...
This mirrors the addition of `uppercase` in https://github.com/launchbadge/sqlx/pull/304 , but for all uppercase snake case.
2020-07-24 07:25:29 -07:00
Ryan Leckey
e575501a39
feat: add Executor::prepare, a hook into the automatic statement preparation life-cycle
2020-07-24 07:24:23 -07:00
Julius de Bruijn
590f97df4a
Caching describe
2020-07-24 07:24:23 -07:00
Austin Bonander
4da66c9200
fix(macros): fix checked = false
being ignored
...
for arguments
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-23 19:53:08 -07:00
Raphaël Thériault
435445fbd0
Edit migrator to make it possible to create static instances
2020-07-23 17:54:05 -04:00
Raphaël Thériault
92646e00b8
Fix migrate! and add migration test
2020-07-23 17:46:27 -04:00
Raphaël Thériault
39b3e4a966
Normalise path resolution accross migrate! and query_file!
2020-07-23 17:11:35 -04:00
Raphaël Thériault
0eb63b7eae
Fix migrate! and improve docs
2020-07-23 16:47:32 -04:00
Raphaël Thériault
8381e87d4a
Document migrate! (and small fixes)
2020-07-23 15:25:13 -04:00
Raphaël Thériault
e5e9665bd9
Add migrate! macro for embedded migrations
2020-07-23 14:22:50 -04:00
Austin Bonander
94aa698581
refactor(macros): remove ResultExt and macro_result!()
2020-07-21 21:19:31 -07:00
Ryan Leckey
ae8800ccc4
feat(postgres): add () for VOID in macro resolution
2020-07-20 23:12:43 -07:00
Ryan Leckey
fa40e9e55f
implement support for postgres TIMETZ type
...
Co-authored-by: Julius de Bruijn <julius+github@nauk.io>
2020-07-17 03:22:40 -07:00
Jonas Platte
4c394de70b
Add SQLX_OFFLINE env variable to force metadata usage
2020-07-17 01:12:07 -07:00
Julius de Bruijn
92cddc76c8
Remove faulty Json declaration from macros
2020-07-15 03:19:23 -07:00
Ryan Leckey
b2ba00f4be
feat(macros): turn on support for JSON in mysql and arrays of JSON in postgres
2020-07-15 02:31:44 -07:00
rumblefrog
51aeee20da
fix(macros) - use re-exported Error type from sqlx crate
2020-07-12 20:50:26 -07:00
OriolMunoz
993352e9d4
Support for #[sqlx(default)]
2020-07-12 03:57:17 -07:00
Ryan Leckey
e765287dba
refactor: restructure relationship between Pool, Connection, and Options
...
* Pool::new -> Pool::connect
* Add Pool::connect_lazy
* Pool::builder -> PoolOptions::new
* PoolConnection no longer implements Connection
* Transaction no longer implements Connection
* Add ConnectOptions::connect
* Add Acquire - abstract between &Pool and &mut Connection within one function
* Remove Connect, move connect to Connection
Co-authored-by: Austin Bonander <austin@launchbadge.com>
2020-07-12 03:43:55 -07:00
Mike Ledger
ee106286a0
get span beforehand
2020-07-09 12:34:19 -07:00
Mike Ledger
627be88634
use Punctuated
2020-07-09 12:34:19 -07:00
Mike Ledger
bea5b8f612
fix warning
2020-07-09 12:34:19 -07:00
Mike Ledger
0a74b16f4f
support string concatenation in query*
2020-07-09 12:34:19 -07:00
Julius de Bruijn
dce7c71c37
Add macro extensions for Decimal
2020-07-09 12:32:19 -07:00
Ryan Leckey
8baeb9215a
fix: correct a couple places from the recent column metadata changes
2020-07-05 04:28:25 -07:00
Ryan Leckey
8d188c5f1a
feat: expose column information on Row
...
- add database-specific Column types: MySqlColumn, PgColumn, etc.
- add Row::columns() -> &[DB::Column]
- add Row::column(I) and Row::try_column(I)
2020-07-05 03:48:36 -07:00
Ryan Leckey
7d22c0917f
Merge remote-tracking branch 'meteficha/felipesere-rebased'
2020-07-04 04:37:11 -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
17e88ac1a4
perf: implement pool benchmark, make fairness an option
2020-07-03 05:59:20 -07:00
Ryan Leckey
4c5ea7af77
Merge remote-tracking branch 'dimtion/pginterval'
2020-07-02 23:35:05 -07:00
Felipe Lessa
617d0e4ad4
Add SQLite chrono types to impl_database_ext.
2020-06-29 21:19:00 +01:00
Ryan Leckey
cfa833fa0d
fix(sqlite): fallback to storage class when typing expressions and infer INTEGER as i64
2020-06-27 19:17:46 -07:00
Ryan Leckey
331b92dee7
Revert "refactor(derives): use separate impls per database"
...
This reverts commit e3483230e0
.
2020-06-27 18:55:10 -07:00
Loïc Carr
71cb68b2f4
feat(postgres) Create bindings for PgInterval
2020-06-27 17:36:06 -07:00
Ryan Leckey
e3483230e0
refactor(derives): use separate impls per database
...
database-generic impls are *mostly* impossible in SQLx so we recently
capitalized on that and made it *totally* impossible (until Rust
has specialization and lazy norm)
2020-06-27 05:30:38 -07:00
Austin Bonander
36a53b44cd
fix(macros): don't emit typechecking code for explicit type overrides on bind params
2020-06-21 06:06:53 -07:00
Austin Bonander
f2515e2472
feat(macros): support nullable column override
2020-06-21 06:06:53 -07:00
Austin Bonander
7b37ebde0f
fix(macros): forbid casts to _
in bind parameters
2020-06-21 06:06:53 -07:00