1599 Commits

Author SHA1 Message Date
Julius de Bruijn
25e72925fa Update to bigdecimal 0.2 and num-bigint 0.3 2020-11-04 17:09:01 -08:00
Julius de Bruijn
333ee69f63 A test to reveal a bug with BigDecimal and PostgreSQL 2020-11-04 17:09:01 -08:00
Marcin Kaźmierczak
1d9ab5245c use futures_channel::oneshot in sqlite worker 2020-11-03 22:51:42 -08:00
Ivan Tham
6a5c54be70 Add context of where to put the offline feature 2020-11-03 22:50:37 -08:00
Eric Semeniuc
c45770da4e Fix grammar on readme 2020-11-03 22:50:15 -08:00
Eric Semeniuc
78a5629d5a Add runtime-actix and migrate features to readme 2020-11-03 22:50:15 -08:00
Jonas Platte
4fda8be005 Fix documentation for SQLX_OFFLINE environment variable 2020-10-29 22:21:57 -07:00
Jonas Platte
85b5ab0fb3 Fix cfg-specific unused lints 2020-10-29 22:21:27 -07:00
Jonas Platte
abdd29f145 Store query metadata only the current build is online
This should help with conflicting writes in some cases, but even without
issues like that it reduces useless I/O.
2020-10-29 22:21:27 -07:00
Jonas Platte
139704f264 Pass SQLX_OFFLINE=false to rustc in prepare
Without this, `cargo sqlx prepare` is just an expensive no-op and
`cargo sqlx prepare --check` checks `sqlx-data.json` against itself.
2020-10-29 22:21:27 -07:00
Jonas Platte
f45f9ae8ed Fix a typo 2020-10-29 22:21:27 -07:00
Rolf Kreibaum
81ef89401e Fix typo: add missing &pool parameter 2020-10-29 20:08:09 -07:00
Austin Bonander
e44031676f doc: improve docs for Type and FromRow derives 2020-10-29 18:33:14 -07:00
Timofey Martynov
5f793c6e95 Add ranges and range arrays types 2020-10-26 01:35:12 -07:00
dignifiedquire
eae3f46237 update libsqlite3-sys to 0.20 2020-10-26 01:34:28 -07:00
dvermd
964837e255 Add #[derive(FromRow)] for tuple struct 2020-10-26 01:33:59 -07:00
Chloe Ross
e816943c60 fix(cli): wait for newlines for confirmations 2020-10-23 19:33:13 -07:00
Eric Semeniuc
abb71120f0 Fixes migration macro with no params
Fixes issue experienced in https://github.com/launchbadge/sqlx/issues/746 when using no parameter:

```
error: paths relative to the current file's directory are not currently supported
 --> src/db.rs:7:5
  |
7 |     sqlx::migrate!().run(&conn).await?;
  |     ^^^^^^^^^^^^^^^^
  |
  = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
```
2020-10-22 21:48:57 -07:00
Peter Maatman
5b7f3ab0e3 sqlite: Add test for JSON functions 2020-10-20 20:08:20 -07:00
Peter Maatman
fae72200e5 sqlite: Add basic json implementation
Fixes #608
2020-10-20 20:08:20 -07:00
Siddhant
65de83aff8 Fixed test cases 2020-10-20 15:13:18 -07:00
Siddhant
1c725df406 Fixed formatting issue 2020-10-20 15:13:18 -07:00
Siddhant
14191da283 Edited test cases to create and drop type 2020-10-20 15:13:18 -07:00
Siddhant
497f92f602 Added test cases for kebab-case enums 2020-10-20 15:13:18 -07:00
Siddhant
e56ce0a998 Added support for kebab case for postgres enums 2020-10-20 15:13:18 -07:00
Max DaPrato
4bfd7a555f Enable support for Vec<DateTime<Utc>> 2020-10-19 15:06:08 -07:00
Daniel Stöckel
144dcceb44 fix(postgres): prefer parsing non-localized notice severity field
In order to support PostgreSQL <= 9.5, the b'S' field of an error/notice
message was parsed. However, this field can be localized and thus parsing
can fail for instances that use a non-english locale. In version > 9.5,
the b'V' field, that is guaranteed to be in english, was added. However,
even for these versions parsing would fail as the b'S' field was also
parsed. This patch prefers b'V' over b'S' if it exists and uses a default
severity in case b'V' is not present and b'S' could not be parsed.

Fixes #734
2020-10-19 00:03:06 -07:00
Austin Bonander
228729e2ee
fix: disable macOS build for sqlx-cli (for reals) 2020-10-18 03:33:44 -07:00
Dana Marcuse
d97014f620 feat: correctly handle percent-encoded socket as host for postgres URI 2020-10-18 01:19:11 -07:00
Dana Marcuse
7b1b8c12ba feat: handle hostaddr postgres URI param and add more tests 2020-10-18 01:19:11 -07:00
Joshua Nelson
591d33b877 Enable all features for sqlx-core on docs.rs 2020-10-17 02:44:53 -07:00
Joshua Nelson
20d65a8248 Remove hashbrown dependency
Hashbrown is now the hashmap used in the standard library, so no need to
pull in an external dependency. This switches to using `AHashMap`
directly.
2020-10-17 02:44:09 -07:00
Austin Bonander
0ad121ba59 fix(ci): disable build for sqlx-cli on macOS 2020-10-17 02:43:31 -07:00
Rodrigo Araujo
d69d897eab Remove last line 2020-10-16 17:31:30 -07:00
Rodrigo Araujo
ce4b8caaa2 Format code 2020-10-16 17:31:30 -07:00
Rodrigo Araujo
f808a81f6c TiDB compatibility: Add support to utf8mb4_bin collation 2020-10-16 17:31:30 -07:00
Jonas Platte
96609d4fc8 Update cfg attributes in sqlx-rt
* Move negated runtime feature checks to the end for consistency
* Remove redundant cfg attribute
2020-10-16 14:49:27 -07:00
Jonas Platte
4a09cba6d2 Update re-exports in sqlx-rt
* async_native_tls::Error is the same as native_tls::Error
* tokio_native_tls is also used for actix (was in the wrong section)
2020-10-16 14:49:27 -07:00
Jonas Platte
e1662e42e1 Fix unused variable warnings in migrate.rs with feature = "mssql" 2020-10-16 14:49:27 -07:00
Gevorg Hindoyan
5835bc4951 Fix NaiveDate parse_from_str argument order
The [documentation](https://docs.rs/chrono/0.4.13/chrono/naive/struct.NaiveDate.html#method.parse_from_str) specifies that `NaiveDate::parse_from_str` takes two arguments: value and format, in respective order. 

Due to this, `DATE` fields could not be read into `NaiveDate`... and I have ptsd.
2020-10-16 14:40:50 -07:00
Mike Cronce
fd25a7530c sqlx-core/src/mysql/protocol/statement/execute.rs: Execute::encode_with(): Encode a 1 for iteration-count instead of 0 2020-10-15 22:51:08 -07:00
Joshua Nelson
7eca0b90e0 Document macros feature in README 2020-10-15 22:36:00 -07:00
Austin Bonander
fa7981f68a fix(pool): ignore spurious wakeups when waiting for a connection
fixes #622
2020-10-13 10:37:10 -07:00
Julius de Bruijn
7a70717944 Use flags to detect MySQL enums
In some cases the returned value is of `ColumnType::String`, but it has
the `ENUM` flag set.
2020-10-13 10:09:06 -07:00
Jonas Platte
277d0413bc Bump paste version 2020-10-13 10:04:05 -07:00
Jonas Platte
1935e91e7a Bump base64 version 2020-10-13 10:04:05 -07:00
Jonas Platte
e00d8aaa5a Bump clap version
This time use an exact version requirement since it would otherwise be
upgraded to later betas automatically.
2020-10-13 10:04:05 -07:00
Jonas Platte
63bfab90c5 Bump hmac version 2020-10-13 10:04:05 -07:00
Jonas Platte
f155bb83e8 Bump hashbrown version 2020-10-13 10:04:05 -07:00
Joshua Nelson
920168a129 Add examples to after_connect documentation
This requires testing with `--features postgres`.
2020-10-13 10:02:24 -07:00