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
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
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
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
Vlad Stepanov
b785f83fc2
[fix] naming + unneeded cast
2020-03-01 18:02:36 +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
11b36fc7e5
Remove unused method extend on ArrayEncoder
2020-02-21 14:18:20 +01:00
Oliver Bøving
521570d8a7
Remember use std::marker::PhantomData
2020-02-21 14:16:02 +01:00
Oliver Bøving
c9c87b6081
Implement support for 1-dim arrays for PostgreSQL
2020-02-21 14:10:12 +01: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
Ryan Leckey
24d6c696f8
Merge pull request #70 from launchbadge/ab/idents-fix
...
sqlx-macros: fix handling of invalid idents
2020-01-21 16:01:56 -08:00
Wesley Norris
1461891901
Fix passwords not being percent decoded
...
The password portion of the `Url` type is post-percent encoding
and needs to be manually decoded before processing and being
sent to the server.
2020-01-21 18:53:07 -05:00
Austin Bonander
831ce2d615
fix build with TLS feature on
2020-01-21 11:57:01 -08: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
Jonas Platte
f93beb460a
Add PgTypeInfo::with_oid
2020-01-18 14:04:17 +01:00
Ryan Leckey
d00c18ec75
Fix query! for the no results case in Postgres and MySQL
2020-01-18 00:43:59 -08:00
Austin Bonander
beba141aec
PgConnection: clear buffers after TLS upgrade
2020-01-16 13:30:48 -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
Ryan Leckey
96f14c0700
Merge remote-tracking branch 'origin/ab/proc-macro-unhack-sort-of' into rl-transaction-1
2020-01-15 00:29:43 -08:00
Ryan Leckey
2e5e273565
Fix Pool alias with Pool changes
2020-01-15 00:26:22 -08:00
Ryan Leckey
b1a27ddac2
Add a Transaction type to simplify dealing with Transactions
2020-01-15 00:22:01 -08:00
Austin Bonander
0fdb875c20
support arbitrary numbers of bind parameters in query!() et al
2020-01-15 00:05:34 -08:00
Ryan Leckey
28ed854b03
Extract Connection::open into a new trait Connect::connect
2020-01-14 23:58:17 -08:00
Ryan Leckey
3183413e9e
Merge pull request #50 from launchbadge/rl-refactor-types
...
Refactor HasSqlType to provide an array of compatible types
2020-01-14 23:32:45 -08:00
Ryan Leckey
6b22fb7489
Refactor HasSqlType to provide an array of compatible types.
...
* Intending to use in a new Row type to check types at runtime for
dynamic queries and to guard against schema changes
* Hoping the query! macro can utilize this to allow accepting N
rust types for 1 sql type and returning N rust types for 1 sql
type.
2020-01-14 23:27:42 -08:00
Austin Bonander
fc66c8fa3f
give examples of connection strings enabling SSL
2020-01-14 12:07:43 -08:00
Ryan Leckey
330b1e2b4e
Fix serialization test for postgres
2020-01-14 10:43:54 -08:00
Ryan Leckey
0a5b527d79
fix import errors and run rustfmt
2020-01-14 10:35:50 -08:00