Tom Dohrmann
a600b5b856
add tests for postgres struct field encoding
2020-03-16 22:58:31 -07:00
Tom Dohrmann
d3cb84b893
fix db type
2020-03-16 22:58:25 -07:00
Tom Dohrmann
c3aeb275c2
add derive macros for weak & strong enums and structs
2020-03-16 22:58:25 -07:00
Ryan Leckey
68d4a0d258
sqlite: produce connection specific errors
...
postgres, mysql: use derive for Debug for error types
2020-03-15 02:14:23 -07:00
Ryan Leckey
63ef32189d
sqlite: implement support for multiple statements
2020-03-14 17:43:44 -07:00
Ryan Leckey
0130fe1479
sqlite: implement describe
2020-03-14 17:43:44 -07:00
Ryan Leckey
5f27026459
sqlite: implement remainder of query API
2020-03-14 17:43:44 -07:00
Ryan Leckey
a3799c3496
sqlite: implement command execution
2020-03-14 17:43:44 -07:00
Ryan Leckey
444ffff127
Run rustfmt
2020-03-14 17:43:44 -07:00
Ryan Leckey
1a48cf3b2c
Reduce some duplication in type parsing
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
7a98253840
postgres: clean up protocol
2020-03-14 17:43:06 -07:00
Ryan Leckey
c7d416a1c3
Add Connection::begin
2020-03-14 17:43:06 -07:00
Austin Bonander
a9f0fca1b2
fix Postgres UI tests for 1.41 stable
2020-03-11 15:43:07 -07:00
Ryan Leckey
76431141e5
postgres: add type test for NULL
2020-03-11 03:34:23 -07:00
Ryan Leckey
a165615f53
row: Row::get panics, Row::try_get is fallible, Query::map panics, Query::try_map is fallible
2020-03-11 03:32:52 -07:00
Ryan Leckey
17f52a819b
Fix doctests for macros
2020-03-11 02:01:48 -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
Ryan Leckey
672f83c00e
use pin-project and fix impl of GuardedFlush
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
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
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
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
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
1975486baa
cargo fmt
2020-03-01 00:05:14 +03:00
Vlad Stepanov
084add9cdb
#115 : implement time-rs support
2020-02-29 22:38:48 +03:00
Oliver Bøving
0de4b5186b
Add the array types to the query! macro
...
This still needs some work, as the inferance and error messages are not
quite where we want them to be
2020-02-25 21:56:07 +01:00
Oliver Bøving
c9c87b6081
Implement support for 1-dim arrays for PostgreSQL
2020-02-21 14:10:12 +01: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