Commit graph

251 commits

Author SHA1 Message Date
Julius de Bruijn
f246d41aed Fixed an overflow with a negative scale 2020-07-09 12:32:19 -07:00
Julius de Bruijn
245d53e484 Test Decimal conversions in my and pg 2020-07-09 12:32:19 -07:00
Julius de Bruijn
e3b3806db5 Handle ParameterStatus in PgStream 2020-07-06 05:56:10 -07:00
Ryan Leckey
41df13ba5a test(postgres): fix unreliable test that depends on the sequence number 2020-07-05 04:40:13 -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
3b503a7764 feat(sqlite): clean up chrono support, add support for NaiveTime and NaiveDate 2020-07-04 05:51:46 -07:00
Ryan Leckey
7d22c0917f Merge remote-tracking branch 'meteficha/felipesere-rebased' 2020-07-04 04:37:11 -07:00
agentsim
7810f7dcdd
Sqlite Collation Support (#446)
* Sqlite Collation Support

Adds a method create_collation to SqliteConnection.
Adds a unit test confirming the collation works as expected.

* Fix formatting

* Address feedback

Co-authored-by: Ryan Leckey <ryan@launchbadge.com>
2020-07-04 04:30:40 -07:00
Ryan Leckey
aaa8b25050 test(sqlite): add a couple macro expression tests 2020-07-04 04:13:53 -07:00
Ryan Leckey
d112c4d807 feat(sqlite): support expressions and multiple no-data statements in the macros 2020-07-04 04:06:43 -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
Ryan Leckey
3a8dc0e211 fix(tests): prevent postgres::pool_smoke_test from starving executor 2020-07-03 05:59:20 -07:00
Ryan Leckey
0824723765 fix: handle zero dates in MySQL, emit as Option::None (treat as NULL) 2020-07-03 05:50:06 -07:00
Julius de Bruijn
b3db51cdfc Implement a proper type for money 2020-07-03 03:57:20 -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
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
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
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
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
Felipe Lessa
f0adeae39e
Add sqlite chrono tests. 2020-06-27 12:08:16 +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
Felipe Lessa
364845e530
Update tests/sqlite/setup.sql to match current tests. 2020-06-27 09:11:02 +01:00
Ryan Leckey
7beceba832 fix(sqlite, test): column overrides still have runtime type checking, use the correct Rust type to match the sql type 2020-06-25 05:34:52 -07:00
Julius de Bruijn
2c2a277666 Caching methods in Connection 2020-06-25 10:44:05 +02:00
Julius de Bruijn
eba82e3fc1 LRU caching for SQLite 2020-06-24 19:46:32 +02:00
Julius de Bruijn
5d64310004 LRU caching for PostgreSQL 2020-06-24 19:01:54 +02:00
Julius de Bruijn
2b6f242a22 LRU statement cache for MySQL 2020-06-24 16:57:06 +02: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
029ba24cad chore(macros): add tests for bind parameter overrides 2020-06-21 06:06:53 -07:00
Austin Bonander
7d3d708d92 chore(macros): add test for column overrides for SQLite 2020-06-21 06:06:53 -07:00
Austin Bonander
1a250976ba chore(macros): add test for column overrides for MySQL 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
efc4df3eea test: state only version 3 for docker-compose 2020-06-21 04:35:28 -07:00
Ryan Leckey
8800a40979 test: tokio or actix should import tokio in pool_smoke_test 2020-06-21 04:34:29 -07:00
Ryan Leckey
9abdd7e408 style: rustfmt 2020-06-21 04:08:17 -07:00
Ryan Leckey
7c4c185698 chore: update dependencies 2020-06-21 03:55:31 -07:00
Ryan Leckey
e7e2f5b37a fix: implement transparent Serialize and Deserialize for Json<_> 2020-06-21 03:55:31 -07:00
Peter Maatman
90242494a8 test: expose missing trait bounds for Json<Vec<x>> 2020-06-21 03:55:31 -07:00
Ryan Leckey
6cfe5ac811 refactor: tweak type name display to use TypeInfo::name 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
Daniel Akhterov
80d545109b
feat: implement BIT support in MSSQL 2020-06-15 22:49:33 -07:00