Commit graph

863 commits

Author SHA1 Message Date
Ryan Leckey
63aa3e8f0f add support for VARCHAR and BPCHAR in postgres 2020-03-24 12:49:52 -07:00
Ryan Leckey
f83e0296cc don't use now private module runtime in tests 2020-03-24 03:13:12 -07:00
Ryan Leckey
dcea3f0586 fix FromRow derive to take &Row 2020-03-24 03:08:58 -07:00
Ryan Leckey
e71b969e78 remove nix files 2020-03-24 03:03:24 -07:00
Ryan Leckey
aa1cb24de9 remove DecodeOwned 2020-03-24 03:03:04 -07:00
Ryan Leckey
fa4138b25c add docs to explain the SQL <-> Rust mapping 2020-03-24 02:56:52 -07:00
Ryan Leckey
43a72657f9 add a hack so bigdecimal can be the package name and the feature name 2020-03-24 02:56:14 -07:00
Ryan Leckey
f2ca42256b Add more documentation for Connection and Transaction 2020-03-24 02:12:42 -07:00
Ryan Leckey
412f7125fb document Cursor 2020-03-24 01:53:56 -07:00
Ryan Leckey
1940b685d3 fix warnings from rustdoc 2020-03-24 01:36:17 -07:00
Ryan Leckey
792acdd554 audit Row, FromRow, and ColumnIndex
* tweak FromRow to accept Row by reference, should make it easier to compose FromRow impls
 * rename ColumnIndex::resolve to ColumnIndex::index
 * document behaviors
2020-03-24 01:24:10 -07:00
Ryan Leckey
0182ce92f2 make sqlx_core::runtime private and add a runtime module to sqlx-macros 2020-03-24 01:19:03 -07:00
Ryan Leckey
e2f90c8f85 Update dependencies 2020-03-23 22:07:38 -07:00
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