14 Commits

Author SHA1 Message Date
Ryan Leckey
757a930e21
refactor(core): remove the HRTB (higher rank trait bound) on Row in the aim of improving ergonomics
* removes the lifetime from Row

 * removes MySqlQueryAs, SqliteQueryAs, etc. (no longer needed)

 * introduce query_scalar

 * introduce Decode::accepts to allow overriding runtime type checking
   per-type (replaces TypeInfo::compatible)

 * introduce Encode::produces to allow overriding the encoded type per-value

 * adds a lifetime to Arguments (and introduce the HRTB HasArguments)
   to support zero-copy encoding with SQLite

 * renames Database::RawBuffer to HasArguments::ArgumentBuffer

 * introduce Connect::connect_with to provide an ConnectOptions type
   explicitly to opt-out of connection string parsing

 * introduce Value and ValueRef traits to allow decoding-deferred
   extraction of values from Rows

 * introduce Encode::encode_by_ref and change Encode::encode to take
   by-value to try and re-use memory where possible

 * use thiserror to generate sqlx::Error

 * [!] temporarily removes query logging

 * [!] temporarily removes transactions
2020-05-30 16:09:08 -07:00
Austin Bonander
6913695588 add support for building in "decoupled" mode 2020-05-30 16:02:37 -07:00
Felix Wiedemann
49f15713d6 Move empty host handling to the DB specific code 2020-04-18 14:31:31 -07:00
George Kaplan
7df6d4dbcf undo URL percent-encoding for SQLite connection strings 2020-04-17 18:23:33 -07:00
James Waples
f05f6bedd9 Decode username on read 2020-03-31 23:03:17 +01:00
Daniel Akhterov
cbdc1bbfb2 Refactor the error to be generic over database 2020-03-20 23:51:45 -07:00
Ryan Leckey
751efdf31b generalize MaybeOwnedConnection and clean up the connection file 2020-03-14 17:43:44 -07:00
Ryan Leckey
7ab07016da sqlite: initial work in connection 2020-03-14 17:43:44 -07:00
Ryan Leckey
7fbc26de05 tls: update tls module for postgres 2020-03-11 01:44:41 -07:00
Wesley Norris
1461891901 Fix passwords not being percent decoded
The password portion of the `Url` type is post-percent encoding
and needs to be manually decoded before processing and being
sent to the server.
2020-01-21 18:53:07 -05:00
Ryan Leckey
0a5b527d79 fix import errors and run rustfmt 2020-01-14 10:35:50 -08:00
Austin Bonander
638852a2dd implement TLS support for Postgres 2020-01-13 11:52:09 -08:00
Ryan Leckey
d76b1357da Audit MySql and Postgres protocols 2019-12-27 17:31:01 -08:00
Austin Bonander
fc07830639 implement facade crate so macros can be used from same namespace 2019-11-22 10:30:16 +00:00