Commit graph

613 commits

Author SHA1 Message Date
Ryan Leckey
820618f396 test: fix some doctests under runtime-tokio 2020-07-18 03:27:05 -07:00
Ryan Leckey
9029a345e5 docs: add some module-level information sqlx::database 2020-07-18 03:13:41 -07:00
Ryan Leckey
f345c23e51 fix(mssql): handle multi-chunk packets
fixes #523
2020-07-17 06:08:36 -07:00
Ryan Leckey
6fdb0d534f chore: update dependencies 2020-07-17 05:36:56 -07:00
Ryan Leckey
cc736df4d6 fix(postgres): use Sync over Flush for terminating extended non-query commands; in addition, keep better track of the number of expected readyForQueries 2020-07-17 04:56:39 -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
Ryan Leckey
e285f0858f refactor: split up postgres chrono/time modules 2020-07-17 03:22:40 -07:00
Ryan Leckey
e413cd6b0b docs: fix links in FromRow docs 2020-07-17 03:22:40 -07:00
Julius de Bruijn
99b7017d6c Conversion from BigDecimal to PgMoney 2020-07-17 02:00:48 -07:00
OriolMunoz
f75891725f FromRow derivation docs 2020-07-17 01:04:56 -07:00
Ryan Leckey
6949b84e8c style: rustfmt 2020-07-15 02:31:57 -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
Ryan Leckey
9b956c0d2c fix(postgres): support the VOID type, as () 2020-07-15 02:16:08 -07:00
Ryan Leckey
25b8fc7c04 fix(sqlite): support column types changing per row 2020-07-15 02:05:00 -07:00
Ryan Leckey
dc5fc1b6c1 fix: do not enforce type equality if matching against the NULL type 2020-07-15 02:04:32 -07:00
Ryan Leckey
63f37a78c3 feat(sqlite): add SqliteConnectOptions::filename 2020-07-14 08:45:30 -07:00
Ryan Leckey
793f247604 refactor: PoolOptions::new() takes no parameters and the final .connect method takes the URI 2020-07-14 06:07:29 -07:00
Ryan Leckey
8de2419b14 style: rustfmt 2020-07-14 05:05:50 -07:00
Ryan Leckey
47d566f5b6 feat: support Done for Any 2020-07-14 04:41:27 -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
8cf3ccc7e9 fix: put back transaction.open flag to stop auto-rollback 2020-07-12 04:42:37 -07:00
Ryan Leckey
d10f299c55 test: tweak in-code examples for latest refactors 2020-07-12 04:30:10 -07:00
Ryan Leckey
ff4dd4c7e7 fix: add a couple missing cfgs for the migrate feature 2020-07-12 04:15:37 -07:00
Joe Grund
d58f20f77a Update column.rs
Skip serialization of `relation_id` and `relation_attribute_no` so they do not appear in `sqlx-data.json`
2020-07-12 03:54:47 -07:00
Ryan Leckey
61e4a4f566 feat: finish v1 of both cli and embedded migrations 2020-07-12 03:43:55 -07:00
Ryan Leckey
b920aa1c55 feat: support user-defined array and pseudo types in postgres 2020-07-12 03:43:55 -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
Julius de Bruijn
2e3e5187f9 Document better! 2020-07-09 12:32:19 -07:00
Julius de Bruijn
08f55bfc28 Simplify mantissa handling 2020-07-09 12:32:19 -07:00
Julius de Bruijn
47de479454 Conversions from Decimal to PgMoney 2020-07-09 12:32:19 -07:00
Julius de Bruijn
e45e6d4173 Set the write part to use simpler math with u128 2020-07-09 12:32:19 -07:00
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
95ac38caed Add money conversions to Decimal 2020-07-09 12:32:19 -07:00
Julius de Bruijn
fd837fce09 Support for rust_decimal::Decimal 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
699df28088 test(postgres): remove usage of DataRow::len() in unit test 2020-07-05 04:37:53 -07:00
Ryan Leckey
15fc837366 fix: sqlite chrono type match after column metadata changes 2020-07-05 04:29:52 -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
250b4d8e10 feat(any): update Any to support the new column metadata 2020-07-05 04:23:10 -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
266a583a6b fix: remove reference to accidentally added WIP module 2020-07-04 05:54: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
d112c4d807 feat(sqlite): support expressions and multiple no-data statements in the macros 2020-07-04 04:06:43 -07:00
Ryan Leckey
d209c60eb7 feat(sqlite): add read_only to SqliteConnectionOptions 2020-07-04 02:55:01 -07:00
Ryan Leckey
3c3356675e fix(sqite): emit REAL for float columns in SQLite as the docs use that word a lot more 2020-07-04 02:54:41 -07:00
Austin Bonander
e2c707b447 fix: make Pool::try_acquire() fair only when fair=true in the options 2020-07-03 05:59:20 -07:00