Commit graph

850 commits

Author SHA1 Message Date
Ryan Leckey
d646a1d509 remove unused import in derives/row 2020-03-23 22:07:06 -07:00
Ryan Leckey
3ecc2e06ba Run rustfmt (small issue in a test) 2020-03-23 21:24:28 -07:00
Ryan Leckey
7bfd37e888 Add a test for #[derive(FromRow)] both with and without a declared lifetime 2020-03-23 21:22:25 -07:00
Ryan Leckey
ba86bc5555 Tweak doc on Cursor::next 2020-03-23 21:22:09 -07:00
Ryan Leckey
a0bf61cc4a Declare ColumnIndex over Row instead of over Database 2020-03-23 21:21:59 -07:00
Ryan Leckey
5ada3f3ae6 Implement #[derive(FromRow)] 2020-03-23 21:18:03 -07:00
Ryan Leckey
d8a793a766 Fix doctests 2020-03-21 03:44:38 -07:00
Ryan Leckey
cb2e3220e0 simplify lifetimes on Row 2020-03-21 03:25:17 -07:00
Ryan Leckey
fc6e6a65f7 only run gated time tests if both time features are not present 2020-03-21 03:20:38 -07:00
Ryan Leckey
4881e7dcee Update dependencies 2020-03-21 03:01:54 -07:00
Ryan Leckey
200d534b8a Fix time/chrono decode tests 2020-03-21 03:01:23 -07:00
Ryan Leckey
0ef1ef3c4f time: we need std feature 2020-03-21 02:42:32 -07:00
Ryan Leckey
db543f8391 clean up Time impl, impl for text modes 2020-03-21 02:34:21 -07:00
Ryan Leckey
4a98a51a19 Merge remote-tracking branch 'utter-step/time-rs' 2020-03-21 01:25:00 -07:00
Ryan Leckey
05d8ac2747 Finish up JSON/JSONB support for Postgres
* implement for &serde_json::RawValue

 * sqlx::types::Json<T> is a common type that all JSON-compatible databases can implement for,
   postgres implements Json<T> as JSONB

 * sqlx::postgres::types::PgJson<T> resolves to JSON

 * sqlx::postgres::types::PgJsonB<T> resolves to JSONB
2020-03-21 01:16:34 -07:00
Oliver Bøving
b7e53e885a First draft of JSON/JSONB support for postgres
This introduces two new wrapper types `Json` and `Jsonb`, currently
exported by `sqlx::postgres::{Json, Jsonb}` and adds serde and
serde_json as optional dependencies, under the feature flag `json`.
Wrapping types in `Json[b]` that implement `serde::Deserialize` and
`serde::Serialize` allows them to be decoded and encoded respectivly.
2020-03-20 23:59:25 -07:00
Daniel Akhterov
cbdc1bbfb2 Refactor the error to be generic over database 2020-03-20 23:51:45 -07:00
Ryan Leckey
f86f80d8b9 mysql: ping now follows the normal stream lifecycle
fixes test introduced by #142

Co-authored-by: Daniel Akhterov <daniel@launchbadge.com>
2020-03-20 20:47:30 -07:00
Ryan Leckey
f82c57e4b2 Merge branch 'Freax13-fetch-one-hang' 2020-03-20 20:10:10 -07:00
Ryan Leckey
476b9308f2 Merge branch 'fetch-one-hang' of https://github.com/Freax13/sqlx into Freax13-fetch-one-hang 2020-03-20 20:10:02 -07:00
Ryan Leckey
ec27b65b26 postgres: change types in macros
Co-authored-by: Oliver Bøving <oliverboving@gmail.com>
2020-03-20 20:07:52 -07:00
Ryan Leckey
e42a995fd9 Extract a PgSequenceDecoder from ArrayDecoder and RecordDecoder and improve to support mutual nesting 2020-03-20 19:56:25 -07:00
Ryan Leckey
13997ce957 Change HasSqlType to Type 2020-03-20 19:55:47 -07:00
Ryan Leckey
9973fa6357 Add decode_err! to help with formatted decode error generation 2020-03-20 19:55:00 -07:00
Ryan Leckey
24d62dd464 Add DecodeOwned to help with trait bounds on owned data 2020-03-20 19:54:44 -07:00
Tom Dohrmann
b36bda1fc9 add test for fetch one messing up stream states 2020-03-20 21:05:25 +01:00
Ryan Leckey
f562e919b7 Merge branch '1d-array-pg-support' of https://github.com/oeb25/sqlx into oeb25-1d-array-pg-support 2020-03-20 10:11:02 -07:00
Ryan Leckey
d5f0e544c8 ipnetwork: add to CI 2020-03-20 10:04:18 -07:00
Ryan Leckey
50c3e5fefb
Merge pull request #138 from PoiScript/master
postgres: ipnetwork support
2020-03-20 09:54:43 -07:00
Ryan Leckey
4f8ee0f08f
Merge pull request #139 from Freax13/fix-error-messages
use syn::Error for error messages
2020-03-20 09:52:14 -07:00
Ryan Leckey
90c16858cd
Merge pull request #141 from Freax13/sqlite-derives
support derives for sqlite
2020-03-20 09:51:08 -07:00
Ryan Leckey
a017150890 postgres: tls: accept invalid certificates and mismatched hostnames under "prefer" 2020-03-20 09:47:18 -07:00
Tom Dohrmann
a944d99c1c support derives for sqlite 2020-03-20 10:21:15 +01:00
PoiScript
fb66cfa665 add ui tests for ipnetwork 2020-03-20 11:26:13 +08:00
PoiScript
9b6e1e089b add type test for ipnetwork 2020-03-20 11:10:58 +08:00
PoiScript
fbbae16a74 update decoding and encoding 2020-03-20 11:10:36 +08:00
PoiScript
3014ab4750 fix typo in Cargo.toml 2020-03-20 10:51:47 +08:00
PoiScript
7ab76ba84e make inet and cidr compatible 2020-03-20 10:19:14 +08:00
PoiScript
c9cca27e65 rename feature gate to ipnetwork 2020-03-20 10:19:14 +08:00
Tom Dohrmann
bd7d85a03e use syn:Error for error messages 2020-03-19 13:42:46 +01:00
PoiScript
060c5d2b66 postgres: ipnetwork support 2020-03-19 18:21:09 +08:00
Ryan Leckey
9be1512833 mysql: use double literals in test 2020-03-18 23:16:56 -07:00
Ryan Leckey
493e520c4e test: capture logs in test driver 2020-03-18 23:16:56 -07:00
Ryan Leckey
a3a97fc0a4
Update README.md 2020-03-18 22:51:31 -07:00
Ryan Leckey
0c4c80a51f Add more detail to description in Cargo.toml 2020-03-18 22:48:46 -07:00
Ryan Leckey
2a8906d1e5 add more documentation 2020-03-18 22:46:44 -07:00
Ryan Leckey
c2dee0cf5a rustdoc only supports text blocks 2020-03-18 22:46:44 -07:00
Ryan Leckey
1fc18460b0 transaction: document, test, and fix operation of nested transactions 2020-03-18 22:46:44 -07:00
Ryan Leckey
f7fd83381d Move RefExecutor into a now public executor module 2020-03-18 22:46:44 -07:00
Ryan Leckey
d5a20e2358
Update CHANGELOG.md 2020-03-18 22:34:34 -07:00