Ryan Leckey
50a9120efb
mysql: use the correct integer width
2020-03-25 04:31:38 -07:00
Ryan Leckey
6049f976f9
opt out of compatible type check for null values
2020-03-25 04:25:38 -07:00
Ryan Leckey
7ab772ea80
postgres: simplify JSON support to just Json<T>
2020-03-25 04:20:35 -07:00
Ryan Leckey
ad2cf1676f
mysql: tweak type equivalence rules to try and support both rust best practices but still be compatible with the loose types of mysql
2020-03-25 03:56:39 -07:00
Ryan Leckey
50928b06b8
mysql: implement type compatible checks
2020-03-25 03:24:43 -07:00
Ryan Leckey
129efcd367
implement a runtime type compatibility check before decoding values
2020-03-25 02:07:17 -07:00
Ryan Leckey
1dc582edd0
postgres: have PgValue remember its type OID
...
this is in preparation of doing type compatibility checks
2020-03-25 01:46:13 -07:00
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
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
fc6e6a65f7
only run gated time tests if both time features are not present
2020-03-21 03:20:38 -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
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
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
50c3e5fefb
Merge pull request #138 from PoiScript/master
...
postgres: ipnetwork support
2020-03-20 09:54:43 -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
Ryan Leckey
9be1512833
mysql: use double literals in test
2020-03-18 23:16:56 -07:00
Ryan Leckey
1fc18460b0
transaction: document, test, and fix operation of nested transactions
2020-03-18 22:46:44 -07:00
Austin Bonander
33677e86a8
move PgNumeric[Sign], PgRecord[Encoder,Decoder] to hidden postgres::types::raw
...
fix errors
2020-03-18 19:36:54 -07:00
Austin Bonander
3a43e939e3
refactor PgNumeric
so NaN can't be misinterpreted, document types
2020-03-18 19:06:14 -07:00
Ryan Leckey
63f5592ecf
postgres: be explicit about an expression type for a test
2020-03-18 19:06:14 -07:00
Austin Bonander
94c40b3eb7
Postgres: implement numeric and BigDecimal support
2020-03-18 19:06:14 -07:00
Ryan Leckey
ebda944581
mysql: unwrap type infos
2020-03-17 22:02:20 -07:00
Ryan Leckey
d380f4b4a8
remove is_null_type and use Option<TypeInfo>
2020-03-17 21:43:41 -07:00
Ryan Leckey
1da6feac56
postgres: use inventory_item from fixture ( still need type name resolution for the test to work reliably )
2020-03-17 21:33:51 -07:00
Ryan Leckey
a3f7029346
sqlite: assert what we get back from the db (it is a fixture)
2020-03-17 21:33:29 -07:00
Ryan Leckey
ec97dfb884
tweak fixtures to add more columns and add some initial for postgres/mysql
2020-03-17 21:32:57 -07:00
Austin Bonander
6cea7e2c1b
macros: add proper test for sqlite using database file
2020-03-17 21:10:19 -07:00
Austin Bonander
8328e07c97
macros + sqlite: fix error for null-typed columns
2020-03-17 21:10:19 -07:00
Ryan Leckey
fb5db48c52
Don't test custom records until we have some kind of fixtures
2020-03-17 19:42:23 -07:00
Ryan Leckey
ff722d0e62
Run rustfmt
2020-03-17 19:35:01 -07:00
Ryan Leckey
d77b2b1e97
derives: update for new Decode/Encode traits and extensively test in usage
2020-03-17 19:26:59 -07:00
Ryan Leckey
4fc5e65f5d
derives: update transparent
2020-03-17 03:24:08 -07:00
Ryan Leckey
602e61ab27
postgres: add support for decoding anonymous tuples and more fully test encoding/decoding records
2020-03-17 02:47:37 -07:00
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