207 Commits

Author SHA1 Message Date
Julius de Bruijn
590f97df4a Caching describe 2020-07-24 07:24:23 -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 e3483230e04a244181c67a0b7752d2406923b12c.
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
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
aaa475cc33 refactor: move Decode::accepts to Type::compatible 2020-06-21 03:55:31 -07:00
Daniel Akhterov
639e10248e
feat: add boolean support to sqlx-macros/mssql 2020-06-16 13:40:53 -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
fedd883d91 style: rustfmt 2020-06-12 15:33:19 -07:00
Caio
d4329e98d4 refactor: prepare to support postgres ranges
- Remove Type bound from Encode + Decode which removes the defaults 
   for produces() and accepts(). This allows custom type implementations
   to be more flexible.
2020-06-12 15:33:19 -07:00
Austin Bonander
646823e093 fix(macros): fix derive for Encode 2020-06-11 03:36:34 -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
a3053119fa fix: expose runtime-actix in sqlx/Cargo.toml 2020-06-01 05:34:52 -07:00
Ryan Leckey
51ae9f00e7
chore: bump version to 0.4.0-pre 2020-05-30 23:15:52 -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
e5b6047009
feat: introduce docker-compose based testing for running locally against many database combinations 2020-05-30 17:51:55 -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