Commit graph

63 commits

Author SHA1 Message Date
Ryan Leckey
f18ab2fecb tweak type decoding in text mode for floats 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
Austin Bonander
0cb7bd1185 make macros work again 2020-03-11 01:43:27 -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
Tim Harding
f0b276ea86 Added tests for trailing commas on query_file! and query_file_as! 2020-02-09 20:41:16 -08:00
timmythetiny
cefd377020 Fix #105, allow trailing commas in query macros 2020-02-08 16:14:50 -08:00
Ryan Leckey
7201f637bf Fix #104, need to advance buffer index to account for the null (one 32-bit length val of -1) 2020-02-01 00:33:59 -08:00
Austin Bonander
eff7c9e125
fix Pool to remove possibility of "leaking" connections (#84)
* fix `Pool` to reduce possibility of "leaking" connections

now uses RAII guards to control `SharedPool::size`

* add smoke test for `Pool` to both Postgres and MySQL tests

add `Pool::is_closed()`

* fix documentation re: pool

* refactor pool implementation to not use futures oneshot channels

https://github.com/launchbadge/sqlx/pull/84#issuecomment-580476223

* run cargo fmt

* Pool: remove superfluous guard struct, document some internal methods
2020-01-31 23:33:42 -08:00
Austin Bonander
2349978417 fix and test floats in MySQL 2020-01-30 12:17:32 -08:00
Austin Bonander
02075c74bd fix tests/mysql-macros.rs 2020-01-28 19:53:39 -08:00
Jane Lusby
ff731ce503 Enable raw ident support 2020-01-28 18:56:25 -08:00
Austin Bonander
f0c88da152
Merge pull request #71 from Freax13/master
add derives for Encode and Decode
2020-01-24 13:13:06 -08:00
Tom Dohrmann
1e9e816fab add proper encode/decode test 2020-01-24 18:36:04 +01:00
Austin Bonander
efed9b3d6d sqlx-macros: fix handling of invalid idents
add regression test with Trybuild

fix lint warnings as otherwise Trybuild wanted to include them
2020-01-21 01:52:57 -08:00
Tom Dohrmann
24007b143a fix tests for decode derive 2020-01-18 13:39:49 +01:00
Tom Dohrmann
bb933decb7 add derives for Encode and Decode 2020-01-18 13:30:16 +01:00
Ryan Leckey
60d45ac44b Fix (again) the handling of nulls in mysql and add an integration test for it 2020-01-18 01:20:26 -08:00
Ryan Leckey
d00c18ec75 Fix query! for the no results case in Postgres and MySQL 2020-01-18 00:43:59 -08:00
Ryan Leckey
3a2a34381f
Streamline CI to run build _then_ db checks (#68)
* Streamline CI to run build _then_ db checks

* Run rustfmt

* Test the sqlx-core manifest explicitly for unit tests

* Fix incorrect feature enabled in CI

* Make doctests conditional on runtime

* Clean up CI file a bit more

* Tweak CI file one more last time
2020-01-16 18:14:47 -08:00
Ryan Leckey
f1b37b9bc2 Add support for unsigned integers and binary in query! for mysql 2020-01-16 12:51:33 -08:00
Ryan Leckey
809bc3964c Run rustfmt 2020-01-15 01:34:20 -08:00
Ryan Leckey
92f12e11aa Add support for Tokio 2020-01-15 01:17:33 -08:00
Austin Bonander
0fdb875c20 support arbitrary numbers of bind parameters in query!() et al 2020-01-15 00:05:34 -08:00
Austin Bonander
da5c538d22 strip out proc-macro-hack 2020-01-15 00:05:09 -08:00
Ryan Leckey
306ed9752d Add i8, date, time, and datetime (chrono) in query! for MySQL and remove bool 2020-01-14 23:32:30 -08:00
Austin Bonander
638852a2dd implement TLS support for Postgres 2020-01-13 11:52:09 -08:00
Daniel Akhterov
db230e2ce0 Resolve Comments
- Remove `hex` from root `Cargo.toml`
    - Make `hmac` crate optional
    - Clean up checking mechanisms for "SCRAM-SHA-256"
    - Use `str::from_utf8` instead of `String::from_utf8_lossyf
    - Update `Sasl*Response` structs be tuple structs
    - Factor out `len` in `SaslInitialResponse.encode()`
    - Use `protocol_err` instead of `expect` when constructing `Hmacf
      instances
    - Remove `it_connects_to_database_user` test as it was too fragile
    - Move `sasl_auth` function into `postgres/connection` as it more
      related to `Connection` rather than `protocl`
    - Return an error when decoding base64 salt rather than panicing
      in `Authentication::SaslContinue`
2020-01-11 03:33:38 -08:00
Daniel Akhterov
507d988fc4 Implememnt SASL Authentication 2020-01-11 03:33:21 -08:00
Ryan Leckey
1350bfb822 Add test for issue #40 2020-01-11 01:00:13 -08:00
Ryan Leckey
92f3f8cf6f Finish reallocation strategy for BufStream
Fixes #30
2020-01-06 10:53:56 -08:00
Austin Bonander
43f1164823 fix macro examples and tests 2020-01-03 19:02:31 -08:00
Ryan Leckey
19e38ab8d3 [MySQL] [Postgres] Add support for BLOB and BYTEA types 2019-12-30 02:10:09 -08:00
Ryan Leckey
1d2240848b [Postgres] Add integration test for Chrono + Postgres 2019-12-30 02:10:09 -08:00
Ryan Leckey
2a42ff9f0d [MySQL] Add an integration tests for chrono + MySQL and fix issues 2019-12-30 02:10:09 -08:00
Ryan Leckey
5e719917c0 Run rustfmt 2019-12-28 03:45:47 -08:00
Austin Bonander
2c424b6d63 allow slices to be passed to query!()
capture args by ref
2019-12-27 23:30:06 -08:00
Ryan Leckey
9b0f34b0ce Fix a couple minor nits with Pool and run rustfmt 2019-12-27 22:47:25 -08:00
Austin Bonander
7d745f98ea implement query_as!() et al, document query macros 2019-12-27 21:45:31 -08:00
Ryan Leckey
56a82346f2 Run cargo fmt 2019-12-27 20:44:03 -08:00
Ryan Leckey
d76b1357da Audit MySql and Postgres protocols 2019-12-27 17:31:01 -08:00
Austin Bonander
56875a8931 finish discussed refactors 2019-12-18 23:02:01 -08:00
Austin Bonander
8aa931356f WIP implement statement caching for MySQL, perform discussed refactors 2019-12-18 23:02:01 -08:00
Austin Bonander
d8d93867b7 implement prepared statement caching for postgres 2019-12-18 23:02:01 -08:00
Austin Bonander
6e2e3bcb49 use dotenv in integration tests 2019-12-11 19:59:23 -08:00
Daniel Akhterov
918657638b Test all number types and String type 2019-12-05 21:36:09 -08:00
Austin Bonander
193e79569a query refactors 2019-12-04 13:30:19 -08:00
Austin Bonander
acca40c88e make query!() output anonymous records 2019-12-03 21:30:53 -08:00
Ryan Leckey
871183d23b Minor fixes and run rustfmt 2019-12-03 00:22:02 -08:00