Commit graph

796 commits

Author SHA1 Message Date
Ryan Leckey
d6ce866c4b Fix TLS refactors for MySQL 2020-03-11 01:54:33 -07:00
Ryan Leckey
a9c3d9f44c Run rustfmt 2020-03-11 01:49:47 -07:00
Ryan Leckey
d58c533a12 Update Cargo.lock format 2020-03-11 01:49:21 -07:00
Ryan Leckey
14c70f2854 Add a few missing imports (from the rebase) 2020-03-11 01:49:11 -07:00
Ryan Leckey
69fc6a51a9 Remove mysql-types-chrono test (covered by mysql-types) 2020-03-11 01:48:01 -07:00
Ryan Leckey
c9df8acc41 Add zero-allocation to MySQL query execution
WIP mysql compiles with types and executor commented out
2020-03-11 01:47:29 -07:00
Austin Bonander
de14a206ff remove pin-project workaround 2020-03-11 01:47:29 -07:00
Ryan Leckey
672f83c00e use pin-project and fix impl of GuardedFlush 2020-03-11 01:47:29 -07:00
Austin Bonander
f3fe264478 implement guarded flush for BufStream
closes #122
2020-03-11 01:47:29 -07:00
Austin Bonander
9cd3f5e75b rename Query::map() to try_map() and nail down some semantics 2020-03-11 01:47:29 -07:00
Austin Bonander
255dce1f06 remove outdated comment 2020-03-11 01:47:29 -07:00
Austin Bonander
800af574c5 query_macros: allow Option<&str> to be passed in place of String
closes #93
2020-03-11 01:47:16 -07:00
Austin Bonander
4163388298 add nullability info to Describe
implement nullability check for Postgres as a query on pg_attribute

implement type name fetching for Postgres as part of `describe()`

add nullability for describe() to MySQL

improve errors with unknown result column type IDs in `query!()`

run cargo fmt and fix warnings

improve error when feature gates for chrono/uuid types is not turned on

workflows/rust: add step to UI-test missing optional features

improve error for unsupported/feature-gated input parameter types

fix `PgConnection::get_type_names()` for empty type IDs list

fix `tests::mysql::test_describe()` on MariaDB 10.4

copy-edit unsupported/feature-gated type errors in `query!()`

Postgres: fix SQL type of string array

closes #107
closes #17

Co-Authored-By: Anthony Dodd <Dodd.AnthonyJosiah@gmail.com>
2020-03-11 01:46:06 -07:00
Ryan Leckey
59cf900348 impl RefExecutor for &mut E ( where E is RefExecutor ) to allow &mut &Pool to continue working in 0.3 2020-03-11 01:46:06 -07:00
Ryan Leckey
13caade571 silence some unused warnings in postgres/tls with tls not compiled in 2020-03-11 01:46:06 -07:00
Ryan Leckey
6ffcf41b0f implement RefExecutor ( allow Query/QueryAs ) for Transaction 2020-03-11 01:46:06 -07:00
Ryan Leckey
10d2b45d9c update dependencies and clean up some more unused imports 2020-03-11 01:46:06 -07:00
Ryan Leckey
b8cd2e9388 remove unused imports 2020-03-11 01:45:04 -07:00
Ryan Leckey
10232a2cdc remove re-exports from sqlx-core and let sqlx fully define the module layout 2020-03-11 01:45:04 -07:00
Ryan Leckey
81bf390678 postgres: remove old commented out test 2020-03-11 01:44:41 -07:00
Ryan Leckey
f337f1c602 postgres: implement text mode for chrono and clean up type tests 2020-03-11 01:44:41 -07:00
Ryan Leckey
7fbc26de05 tls: update tls module for postgres 2020-03-11 01:44:41 -07:00
Ryan Leckey
370ad81b8e remove now unused pieces of ConnectionSource and MaybeOwnedConnection 2020-03-11 01:44:41 -07:00
Ryan Leckey
47f3d77e59 query_as: fully implement query_as, required a db-specific ext trait 2020-03-11 01:44:41 -07:00
Ryan Leckey
f18ab2fecb tweak type decoding in text mode for floats 2020-03-11 01:44:06 -07:00
Ryan Leckey
4c102f7b0e Database::Connection requires a Connection that can be connected 2020-03-11 01:44:06 -07:00
Ryan Leckey
8e8cf6db20 postgres: fix various issues and add more tests 2020-03-11 01:44:06 -07:00
Ryan Leckey
433aab1e5b postgres: use RawValue in Decode and implement row-returning simple queries 2020-03-11 01:44:06 -07:00
Ryan Leckey
9f1cf953c0 decode: use HasRawValue 2020-03-11 01:43:27 -07:00
Ryan Leckey
dd5f250e5e decode: add lifetime to Decode; impl Decode for &str and &[u8]; remove DecodeError 2020-03-11 01:43:27 -07:00
Ryan Leckey
d257c32946 postgres: handle NoticeResponse 2020-03-11 01:43:27 -07:00
Ryan Leckey
70d15f2262 Executor::describe requires &str not &String 2020-03-11 01:43:27 -07:00
Ryan Leckey
09f30067a0 Error::NotFound -> Error::RowNotFound and remove Error::FoundMoreThanOne 2020-03-11 01:43:27 -07:00
Ryan Leckey
e0fa55f241 Add additional docs to Query::bind 2020-03-11 01:43:27 -07:00
Ryan Leckey
817d07c081 Use non_exhaustive on sqlx::Error 2020-03-11 01:43:27 -07:00
Ryan Leckey
f462343787 Split Executor into Executor and RefExecutor
* Allow `conn.fetch(" ... ")` to be called where `conn` is an owned Connection
 * Executor::fetch -> RefExecutor::fetch_by_ref
 * Executor::fetch_by_ref -> Executor::fetch
 * Move `Connection::describe` to `Executor::describe`
 * `Transaction` is no longer a `Connection`
 * `Connection` has `Executor` as a super-trait again which greatly simplifies bounds
2020-03-11 01:43:27 -07:00
Ryan Leckey
0afcf33395 rename Executor::execute to Executor::fetch 2020-03-11 01:43:27 -07:00
Ryan Leckey
72b60e8a7d remove the DB type parameter from HasCursor and push to an associated type; remove Cursor::first 2020-03-11 01:43:27 -07:00
Ryan Leckey
d981262e7e row: RowIndex -> ColumnIndex and de-duplicate logic with macros 2020-03-11 01:43:27 -07:00
Austin Bonander
0cb7bd1185 make macros work again 2020-03-11 01:43:27 -07:00
Ryan Leckey
55ffd989e1 postgres: add support for simple queries (that do not return results) 2020-03-11 01:43:17 -07:00
Ryan Leckey
7404708bab adjust Cursor::map to work through black magic hacks and hope we get GATs soon 2020-03-11 01:43:17 -07:00
Ryan Leckey
a374c18a18 postgres: rewrite protocol in more iterative and lazy fashion 2020-03-11 01:43:17 -07:00
Ryan Leckey
3795d15e1c postgres: break out TLS and SASL into their own files 2020-03-11 01:43:04 -07:00
Ryan Leckey
ea1a4fb042 add Cursor and rewrite Executor/Query over it
* this breaks a lot internally as-is
 * mysql needs a restructure
2020-03-11 01:43:04 -07:00
Ryan Leckey
bb17ebfbbd make Connect extend Connection to simplify bounds 2020-03-11 01:42:34 -07:00
Ryan Leckey
d3d58ef0cf remove unused methods from Arguments: is_empty, len, size 2020-03-11 01:42:34 -07:00
Ryan Leckey
05bc3ba987 Prepare v0.2.6 2020-03-10 15:40:33 -07:00
Ryan Leckey
d15853f105 Update CHANGELOG 2020-03-10 15:38:40 -07:00
Ryan Leckey
fc610375e8
Merge pull request #126 from repnop/bitfiddling-strikes-back
Fix null bitmap bytes being cleared
2020-03-10 15:33:04 -07:00