Jonas Platte
b14266ba2e
Add rustls support
2020-11-12 07:32:59 -08:00
Jonas Platte
a161bcba05
Rename cargo features in preparation for rustls support
2020-11-12 07:32:21 -08:00
Eric Semeniuc
abb71120f0
Fixes migration macro with no params
...
Fixes issue experienced in https://github.com/launchbadge/sqlx/issues/746 when using no parameter:
```
error: paths relative to the current file's directory are not currently supported
--> src/db.rs:7:5
|
7 | sqlx::migrate!().run(&conn).await?;
| ^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
```
2020-10-22 21:48:57 -07:00
drklee3
dfb096eaa7
docs(macros): Add missing closing bracket in code example
2020-08-15 18:32:38 -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
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
40f0a22765
Merge remote-tracking branch 'magurotuna/doc-links'
2020-07-24 07:33:27 -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
Austin Bonander
41bf5e30ee
docs(macros): mention interpreting EXPLAIN output for SQLite
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-23 20:19: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
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
Yusuke Tanaka
0890313259
doc: fix wrong links
2020-07-24 00:31:05 +09:00
Austin Bonander
67ad43491d
doc: adjust macros documentation
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-21 22:40:13 -07:00
Austin Bonander
94aa698581
refactor(macros): remove ResultExt and macro_result!()
2020-07-21 21:19:31 -07:00
Ryan Leckey
6949b84e8c
style: rustfmt
2020-07-15 02:31:57 -07:00
Ryan Leckey
3884bf272d
refactor: expose Encode/Decode from crate root
2020-07-15 02:05:13 -07:00
Ryan Leckey
00137d4a04
feat: add sqlx::Done and return from Executor::execute()
...
+ Done::rows_affected()
+ Done::last_insert_id()
2020-07-14 04:31:25 -07:00
Ryan Leckey
93cab2a197
test: more pool usage adjustments
2020-07-12 05:02:40 -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
Austin Bonander
c327e63f46
fix(macros): fix broken _unchecked macros
...
These should all expand to invocations of `expand_query!()` but I guess I missed a couple.
Closes #503
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-09 13:10:19 -07:00
Mike Ledger
0a74b16f4f
support string concatenation in query*
2020-07-09 12:34:19 -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
5d6516da68
fix: re-add MapRow and TryMapRow to fix HRTB normalization when more than one driver is in-use
2020-07-02 23:00:46 -07:00
Ryan Leckey
a7117dd71b
feat(any): introduce the Any database driver which enables choosing the database driver at runtime
2020-06-27 04:07:40 -07:00
Austin Bonander
f2515e2472
feat(macros): support nullable column override
2020-06-21 06:06:53 -07:00
Austin Bonander
897c8f429a
doc(macros): document type override feature for macros
2020-06-21 06:06:53 -07:00
Ryan Leckey
8b4ef3f0b8
docs: add back type module documentation
2020-06-21 03:55:31 -07:00
Ryan Leckey
aaa475cc33
refactor: move Decode::accepts to Type::compatible
2020-06-21 03:55:31 -07:00
Ryan Leckey
5ac7601fe2
docs: extend documentation on Encode/Decode
2020-06-21 03:55:31 -07:00
Ryan Leckey
e3adb88ab5
feat: disassociate Type from Decode further and require only Decode for FromRow + Row + Value
2020-06-21 03:55:31 -07:00
Ryan Leckey
c9f3e1adca
feat(postgres): add support for built-in range types and allow derives to handle custom range types
...
Co-authored-by: Caio <c410.f3r@gmail.com>
2020-06-12 15:33:19 -07:00
Ryan Leckey
a0ccc135aa
style(mssql): rename MsSql to Mssql as MSSQL is not written MsSQL
2020-06-07 05:39:12 -07:00
Ryan Leckey
9a701313bc
feat(mssql): implement enough to get simple queries working
...
Co-authored-by: Daniel Akhterov <akhterovd@gmail.com>
2020-06-07 02:00:12 -07:00
dignifiedquire
9b68eb19ef
fix(sqlx-macros): update trait definitions
2020-06-05 19:49:31 -07:00
Ryan Leckey
9341cb8651
test: mark macro doctests as ignored (for now)
2020-06-01 17:06:42 -07:00
Ryan Leckey
990466ec02
fix(cli): fix core usage in sqlx-cli
2020-05-30 23:12:53 -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
88532ffc28
refactor: clean up warnings
2020-05-30 17:51:49 -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
2a6f1a24ea
document offline mode for query!()
2020-05-30 16:02:37 -07:00
Austin Bonander
6913695588
add support for building in "decoupled" mode
2020-05-30 16:02:37 -07:00
meh
bfc52ca2f4
Add query_unchecked and query_file_unchecked macros
2020-04-16 09:54:09 -07:00
Austin Bonander
604f2f308d
document nullability changes of query*!()
2020-03-28 17:50:27 -07:00
Austin Bonander
6fde5a2579
implement nullability on macro output, test postgres
2020-03-28 17:50:27 -07:00
Ryan Leckey
2f80621279
Add query_as_unchecked! and query_file_as_unchecked! to use the macro system with unchecked input and output
2020-03-27 16:37:28 -07:00