50 Commits

Author SHA1 Message Date
Ryan Leckey
46f314103a
feat(core): add TypeEncode::compatible 2021-02-18 23:46:06 -08:00
Ryan Leckey
ed3e9fdd38
feat(core): add Arguments, arguments::Argument, and arguments::ArgumentIndex 2021-02-18 23:46:06 -08:00
Ryan Leckey
831df74b93
feat(core): add Type, TypeEncode, and TypeDecode 2021-02-18 23:46:06 -08:00
Ryan Leckey
f7516ea22d
feat(core): add TypeInfo, Database::TypeInfo, Database::TypeId, and Column::type_info 2021-02-18 23:46:05 -08:00
Ryan Leckey
7f036dfb4a
style: remove unused imports 2021-02-18 23:46:05 -08:00
Ryan Leckey
ca7e138b68
chore: update lockfile 2021-02-18 23:46:05 -08:00
Ryan Leckey
a637e69d19
refactor: add Connect::connect_with(&Options) and reduce complexity of facade
- remove as much as possible from the DbConnectOptions facade with From and Deref

 - add From, Deref, and DerefMut to DbConnection facade
2021-02-18 23:46:05 -08:00
Ryan Leckey
8203410e3f
reactor(core): remove Rt param from Database trait and remove Connection associated type
- significantly cleans up the sqlx/ zero-prelude wrapping
2021-02-18 23:46:05 -08:00
Ryan Leckey
8925d2be0a
feat(core): add Encode and Decode 2021-02-18 23:46:04 -08:00
Ryan Leckey
b7cf04d9cf
feat(mysql): impl command state tracking, fetch_all, and fetch_optional
before each command, any dirty state is flushed
2021-02-18 23:46:04 -08:00
Ryan Leckey
b837a3ca25
feat(core): add fetch_optional and fetch_one 2021-02-18 23:46:04 -08:00
Ryan Leckey
a6c8cb02df
feat(core): expand Executor with fetch_x, declare Column, Row, and QueryResult 2021-02-18 23:46:03 -08:00
Ryan Leckey
76dd78f639
feat(core): add (minimal) Executor 2021-01-26 01:17:54 -08:00
Ryan Leckey
66ceff37b7
feat(core): impl io::Serialize for a byte slice 2021-01-26 01:17:54 -08:00
Ryan Leckey
965389557e
chore: update async-compat to release 0.2 (tokio 1.0 support) 2021-01-26 01:17:52 -08:00
Daniel Akhterov
d5053d1b1d
feat: begin work on postgres 2021-01-22 00:21:16 -08:00
Ryan Leckey
e10f1bf5d5
fix(mock): sqlx_core::Async is only available if feature = "async" 2021-01-20 19:43:19 -08:00
Ryan Leckey
a0ce421989
refactor: remove preludes and provide inherent methods on wrapped types
- sqlx::mysql::MySqlConnection is a tuple struct of sqlx_mysql::MySqlConnection

 - sqlx::mysql::MySqlConnection provides both connect() and connect().await
   using crate-local specialization from negative trait bound inference
2021-01-20 19:39:25 -08:00
Ryan Leckey
e719f698f4
polish: collapse a couple async/blocking groups 2021-01-14 19:01:39 -08:00
Ryan Leckey
d07eabd201
feat(core): add IoStream::shutdown and IoStream::shutdown_async 2021-01-11 00:45:11 -08:00
Ryan Leckey
f748c70132
refactor(core): merge flush and flush_async into flush! 2021-01-11 00:12:53 -08:00
Ryan Leckey
fbbf50a9d0
fix(mock): impl Async for Mock 2021-01-11 00:12:31 -08:00
Ryan Leckey
8562dba0dc
feat(core): add ConnectOptions::parse for convenience 2021-01-10 19:52:19 -08:00
Ryan Leckey
6c8d68e9d0
refactor: marker traits for non-blocking <Async> vs <runtime::Blocking>
- enforce compile-time errors if you try to block on an async-only runtime
   or await a blocking runtime

 - remove viral HRTB for Streams

 - support UNIX streams
2021-01-10 19:23:04 -08:00
Ryan Leckey
cbf280b240
docs: polish, add some information on supported databases and runtimes 2021-01-10 13:02:57 -08:00
Ryan Leckey
d3cfa6fccd
fix(mock): re-enable mock feature 2021-01-10 11:51:01 -08:00
Ryan Leckey
6adf743225
chore: update actix-rt, remove tokio 0.2 from workspace 2021-01-10 11:34:54 -08:00
Ryan Leckey
7144ebc8a0
style: clippy 2021-01-10 11:33:55 -08:00
Ryan Leckey
769e8aa461
refactor: introduce io::Stream (blocking::io::Stream) to encapsulate needed IO methods
- rename sqlx::AsyncRuntime to sqlx::Async
 - don't set default runtime in traits
2021-01-10 10:45:29 -08:00
Ryan Leckey
d2b31950cf
refactor: split <Connection> into <Connect>, <Close>, <Acquire>, and <Connection> 2021-01-09 16:37:36 -08:00
Ryan Leckey
4eae05f9b4
fix: allow sqlx to be compiled without any features 2021-01-08 16:58:04 -08:00
Ryan Leckey
16077216df
style: clippy 2021-01-08 16:39:12 -08:00
Ryan Leckey
91fa554063
chore(core): switch to (maintained) bytestring::ByteString from string::String<Bytes> 2021-01-08 15:26:39 -08:00
Ryan Leckey
e8ea502cbb
fix(core): blocking IO runtime compiles in isolation 2021-01-08 15:26:06 -08:00
Ryan Leckey
06a8ed03bc
test(core): add a Mock runtime to stub and spy on IO streams for unit testing connections 2021-01-08 15:24:38 -08:00
Ryan Leckey
b0e8c1bc20
style: rustfmt 2021-01-06 23:04:17 -08:00
Ryan Leckey
e24b1a0864
feat(core): support blocking access on BufStream 2021-01-06 23:03:57 -08:00
Ryan Leckey
7750168b80
wip(mysql): connect phase 2021-01-02 10:47:15 -08:00
Ryan Leckey
2195472e3e
feat(core): add DatabaseError 2021-01-02 10:46:51 -08:00
Ryan Leckey
013df5ad9e
fix(core): import TryFutureExt to access map_ok 2021-01-01 12:40:40 -08:00
Ryan Leckey
ac408e9a56
style: rustfmt 2021-01-01 12:35:47 -08:00
Ryan Leckey
55a8e7ba29
wip(mysql): connection/establish, WriteExt, BufExt, and settle on AsyncRuntime 2021-01-01 12:28:48 -08:00
Ryan Leckey
44c175bb19
feat(mysql): fill out more in MySqlOptions and settle on accessors [#659] 2020-12-30 16:10:04 -08:00
Ryan Leckey
6ed3cb4aad
chore(core): allow a DefaultRuntime with no features selected 2020-12-28 16:10:28 -08:00
Ryan Leckey
93bb9cceb0
feat(mysql): add initial Connection and Database types, hookup runtimes 2020-12-28 02:18:05 -08:00
Ryan Leckey
7a323f3471
feat(core): refine runtime abstraction
- traits from sqlx::blocking::_ have sqlx::_ traits as dependents

 - methods in sqlx::_ traits are cfg-d on "async" with an additional Rt: Async bound
2020-12-28 00:16:44 -08:00
Ryan Leckey
fb4f2ca602
feat(core): add minimal Connection and ConnectOptions traits 2020-12-27 17:46:11 -08:00
Ryan Leckey
f613b3c7b5
fix: invalid clippy lint name 2020-12-27 17:04:56 -08:00
Ryan Leckey
50e43a8211
feat(core): add minimal Runtime and blocking::Runtime and re-expose sqlx-core in sqlx 2020-12-27 17:01:44 -08:00
Ryan Leckey
69c4aab9f6
chore(core): initial commit 2020-12-27 12:31:43 -08:00