1436 Commits

Author SHA1 Message Date
Ryan Leckey
c82cf8f030 refactor(postgres, interval): clean up PgInterval a touch, remove any extra methods for now 2020-07-03 01:46:33 -07:00
Ryan Leckey
4c5ea7af77 Merge remote-tracking branch 'dimtion/pginterval' 2020-07-02 23:35:05 -07:00
Ryan Leckey
0b2844bf39 feat(any): implement ColumnIndex<AnyRow> for &str to enable FromRow for the Any driver
closes #464
2020-07-02 23:28:53 -07:00
Ryan Leckey
222cd688a4 feat(sqlite): enable configuration of journal_mode and foreign_keys and default to WAL and ON 2020-07-02 23:18:14 -07:00
Ryan Leckey
20229ea2b9 fix: actually use TryMapRow and MapRow in Query 2020-07-02 23:03:14 -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
c7c46f237b fix(sqlite): argument bind for sqlite is 1-indexed
fixes #467
2020-07-02 22:52:33 -07:00
Ryan Leckey
72700615c8 chore: update lockfile 2020-07-02 22:38:34 -07:00
Ryan Leckey
33ab2b9049 style: rustfmt 2020-07-02 22:38:23 -07:00
Ryan Leckey
1a7480774b fix(postgres): after closing a statement, the connection should await CloseComplete 2020-07-02 22:37:04 -07:00
Julius de Bruijn
24d626b883 Reveal SQLite's extended error code 2020-07-01 09:33:18 -07:00
Felipe Lessa
617d0e4ad4
Add SQLite chrono types to impl_database_ext. 2020-06-29 21:19:00 +01:00
Peter Maatman
eda0b7dea4 mysql: Fix decoding of TIME '00:00:00.000000'
Fixes #418
2020-06-29 04:33:25 -07:00
Ryan Leckey
e4005bb53d fix(mssql): handle errors without breaking the stream 2020-06-27 20:46:25 -07: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
513d666217 fix(any): support binding nulls in the any driver 2020-06-27 18:56:33 -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
Ryan Leckey
0b34545608 Revert "refactor: remove several blanket impls to allow more customization"
This reverts commit eb26e9f557bdefc2baa9eb4a89717dfabb55e5a1.
2020-06-27 18:54:50 -07:00
Ryan Leckey
f9d961ae1d fix(any): rework decode and encode to not use blanket impls 2020-06-27 18:53:32 -07:00
Loïc Carr
523f650340 feat(postgres) Add support for std::time::Duration, time::Duration & chrono::Duration 2020-06-27 17:42:46 -07:00
Loïc Carr
71cb68b2f4 feat(postgres) Create bindings for PgInterval 2020-06-27 17:36:06 -07:00
Felipe Lessa
c827c72808
FixedOffset for SQLite + Local test. 2020-06-27 21:59:49 +01:00
Austin Bonander
e2dabeeeee fix: use correct io:Error constructor in net/socket.rs 2020-06-27 11:15:11 -07:00
Ryan Leckey
518eb0c41a chore: add any to all-databases and to each db test in CI 2020-06-27 06:04:30 -07:00
Ryan Leckey
f0e79979dd fix: remove XQueryAs imports (gone in 0.4) 2020-06-27 06:02:14 -07:00
Ryan Leckey
4bb88e7da2 chore: update dependencies 2020-06-27 05:57:21 -07:00
Ryan Leckey
53ebfcd5ec chore: update lockfile 2020-06-27 05:56:30 -07:00
Marcus Griep
816ea65c39 fix(mysql): improve compatibility with ProxySQL
Joins the MySQL connection setup statements into a single statement to
prevent issues with ProxySQL, which requires special handling of
connections that might be shared between multiple backends.

Fixes #422

Signed-off-by: Marcus Griep <marcus@griep.us>
2020-06-27 05:55:34 -07:00
Ryan Leckey
4989327c97 fix: remove cfg flag on .capacity 2020-06-27 05:51:03 -07:00
Julius de Bruijn
2115d02cb0 Move pg-specific socket options to its options.
Makes tcp connections explicit.
2020-06-27 05:34:23 -07:00
Julius de Bruijn
71ebeb9cc3 Remove warnings on mssql for statement cache 2020-06-27 05:34:23 -07:00
Julius de Bruijn
bcc42644e6 Do not do compile-time checks on pg socket 2020-06-27 05:34:23 -07:00
Julius de Bruijn
0ccfab1f25 Decide host parameter between host and socket
- If starts with a leading `/`, use socket
- If not, use host
2020-06-27 05:34:23 -07:00
Julius de Bruijn
868dc3dd5b MySQL UDS Support
- Adds support for Unix Domain Sockets on MySQL
- Allows setting the socket path in PostgreSQL connection options
- ... and MySQL connection options
2020-06-27 05:34:23 -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
Felipe Lessa
30faf73208
Use DATETIME for Sqlite chrono, fix parsing and docs.
The name DATETIME is used as an example by the SQLite documentation
(https://sqlite.org/datatype3.html#affinity).
2020-06-27 12:22:27 +01:00
Ryan Leckey
af7bd71ab2 test: require any feature for any/any test 2020-06-27 04:10:06 -07:00
Ryan Leckey
6235eb5a5e fix: StatementCache::capacity is only used by sqlite 2020-06-27 04:09:58 -07:00
Felipe Lessa
f0adeae39e
Add sqlite chrono tests. 2020-06-27 12:08:16 +01:00
Felipe Lessa
516af07713
Sqlite support for DateTime<{Utc,Local}>. 2020-06-27 12:08:00 +01: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
Ryan Leckey
62d02e9450 feat: implement Execute for (&str, Arguments) 2020-06-27 04:06:54 -07:00
Ryan Leckey
5091a28ce6 refactor: remove Default requirement for ArgumentBuffer 2020-06-27 04:06:35 -07:00
Ryan Leckey
b7ec7bbd3e refactor: allow non-Send adding to arguments crate-local 2020-06-27 04:06:22 -07:00
Ryan Leckey
eb26e9f557 refactor: remove several blanket impls to allow more customization 2020-06-27 04:05:23 -07:00
Ryan Leckey
34859af1d3 feat(core): lift Send bound for arguments to Arguments::add
Execute already required Send so this just makes it fail earlier
2020-06-27 04:03:17 -07:00
Felipe Lessa
4254735dcf
Update sqlite chrono support so it compiles. 2020-06-27 09:12:33 +01:00
Felipe Lessa
364845e530
Update tests/sqlite/setup.sql to match current tests. 2020-06-27 09:11:02 +01:00
Felipe Sere
333803c1ff
Correct table headings and only list types that are actually implemented 2020-06-27 08:25:07 +01:00
Felipe Sere
7c27065c09
First attempt at roundtripping chrono types through SQLite 2020-06-27 08:25:05 +01:00