Commit graph

850 commits

Author SHA1 Message Date
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
Wesley Norris
737dd038c5 Fix null bitmap being cleared 2020-03-09 20:31:49 -04:00
Vlad Stepanov
78362ccc41 update README.md 2020-03-04 22:11:46 +03:00
Vlad Stepanov
b785f83fc2 [fix] naming + unneeded cast 2020-03-01 18:02:36 +03:00
Vlad Stepanov
2082ce15e5 [fix] move one use behind the cfg-flag, as it is used conditionally 2020-03-01 13:44:03 +03:00
Vlad Stepanov
a3160d2bae [fix] query usage in postgres ITs 2020-03-01 13:31:29 +03:00
Vlad Stepanov
0656c880cc cargo fmt 2020-03-01 13:23:57 +03:00
Vlad Stepanov
b2f50de16f review fixes: change test attributes, fix tests, add time encoding-decoding tests 2020-03-01 13:20:24 +03:00
Vlad Stepanov
322393c9ee [fix] revert default features 2020-03-01 11:57:32 +03:00
Vlad Stepanov
1975486baa cargo fmt 2020-03-01 00:05:14 +03:00