Jonas Platte
85b5ab0fb3
Fix cfg-specific unused lints
2020-10-29 22:21:27 -07:00
Jonas Platte
abdd29f145
Store query metadata only the current build is online
...
This should help with conflicting writes in some cases, but even without
issues like that it reduces useless I/O.
2020-10-29 22:21:27 -07:00
Ferenc Tamás
a46d7f8fdf
fix(macro): offline env
2020-10-13 09:49:36 -07:00
Chloe Ross
5f3245d7f4
format: run cargo fmt
2020-07-31 04:14:48 -07:00
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
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
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
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
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
Austin Bonander
94aa698581
refactor(macros): remove ResultExt and macro_result!()
2020-07-21 21:19:31 -07:00
Jonas Platte
4c394de70b
Add SQLX_OFFLINE env variable to force metadata usage
2020-07-17 01:12:07 -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
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
Austin Bonander
17e88ac1a4
perf: implement pool benchmark, make fairness an option
2020-07-03 05:59:20 -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
Austin Bonander
14023e8e6e
feat(macros): support wildcard in bind param type overrides
2020-06-21 06:06:53 -07:00
Austin Bonander
eb831382e5
feat(macros): type override annotations for columns
2020-06-21 06:06:53 -07:00
Ryan Leckey
6497d67b6a
feat(mssql): add macro support
2020-06-07 16:29:46 -07:00
Austin Bonander
80b4e2fca6
fix(macros): reintroduce and fix macro tests for MySQL
2020-06-05 21:02:24 -07:00
Austin Bonander
bddb2e560f
fix(macros): fix macros for Postgres
2020-06-05 20:28:21 -07:00
dignifiedquire
9b68eb19ef
fix(sqlx-macros): update trait definitions
2020-06-05 19:49:31 -07:00
Ryan Leckey
d4d994bae4
fix: found a few more changes needed in internal core usage in macros
2020-05-30 18:11:05 -07:00
Ryan Leckey
e8aa127c55
fix: tweak sqlx-core usage in macros after the latest massive refactor
2020-05-30 17:56:19 -07:00
Ryan Leckey
9d2a0141cb
feat: introduce IntoArguments, query_with, query_as_with, and query_scalar_with
2020-05-30 17:51:55 -07:00
Ryan Leckey
a54b1267f6
refactor(macros): adapt to the 0.4.x core refactor
2020-05-30 17:51:49 -07:00
Austin Bonander
1bdc3e9057
cargo sqlx prepare: fix to consistently trigger recompile
2020-05-30 16:02:37 -07:00
Austin Bonander
03773d0065
sqlx-macros: simplify query_macros module name, delete unused file
2020-05-30 16:02:37 -07:00