Commit graph

1512 commits

Author SHA1 Message Date
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
Joshua Nelson
2be4601150 Add size() and num_idle() 2020-10-13 09:57:56 -07:00
Kramer Hampton
d0ccb4d0b2 feat: parse additional parameters: user, password, port, dbname. Also
add additional documentation and an example connection string using
parameters.
2020-10-13 09:56:48 -07:00
Kramer Hampton
1f41e4c54d chore: forgot to commit lock file changes 2020-10-13 09:55:51 -07:00
Kramer Hampton
74d2f57de3 fix: add todos example to workspace 2020-10-13 09:55:51 -07:00
Wesley Norris
727ebf0b38 Percent decode MySQL passwords from URL string
Fixes #603.
Adds percent decoding for MySQL passwords for when they contain non-URL
safe passwords, along with a regression test to prevent further
instances of this issue.
2020-10-13 09:55:40 -07:00
Patryk Wychowaniec
ca07158949 sqlite: Fix #616 2020-10-13 09:54:50 -07:00
Jonas Platte
e3a71f095c Delete target/sqlx before invoking cargo in cargo sqlx prepare 2020-10-13 09:51:10 -07:00
Jonas Platte
3b9c98d979 Fix bounds for F on query::Map
Query::map was not usable before.
2020-10-13 09:50:34 -07:00
Jonas Platte
4ad4a42edd Make Send a supertrait of TryMapRow, MapRow
Map<'q, DB, F, A> where F: !Send was useless and these traits are only
used as part of Map. This might improve error messages.
2020-10-13 09:50:34 -07:00
Ferenc Tamás
a46d7f8fdf fix(macro): offline env 2020-10-13 09:49:36 -07:00
Chris Couzens
8e4d061dc1 Correct PgConnectOptions to MySql in mysql docs
I'm using this library for the first time, and I noticed this small oversight in the docs.
2020-10-07 05:24:03 -07:00
Kramer Hampton
2e1658e08b feat: adds the setup command to the sqlx-cli
The reset command is the equivalent of `sqlx db create`,
and `sqlx migrate run`.
2020-09-10 21:32:04 -07:00
Kramer Hampton
916f1fccf2 feat: adds the reset command to the sqlx-cli
The reset command is the equivalent of `sqlx db drop`, `sqlx db create`,
and `sqlx migrate run`. Unless the `-y` parameter is specified, it will
prompt confirmation before dropping the database.
2020-09-10 21:32:04 -07:00
David Yamnitsky
44594e2e03 impl From for AnyConnectOptions 2020-09-09 01:18:28 -07:00
Mike Cronce
1acd782e7f sqlx-core/src/mysql/types/str.rs: cargo fmt 2020-09-02 22:53:13 -07:00
Mike Cronce
d8142a8fa3 sqlx-core/src/mysql/types/str.rs: str::compatible(): Added support for charset number 33 (utf8 COLLATE utf8_general_ci) 2020-09-02 22:53:13 -07:00
Andrew Whitehead
9cd9209aa3 add support for pooling in-memory sqlite DB, enabling shared cache 2020-09-02 22:51:03 -07:00
Ryan Leckey
67099d993c Merge remote-tracking branch 'frigus02/pg-percent-decode' into master 2020-08-19 18:03:31 -07:00
LMJW
48a55a407b fix(issue #558)
- check the existance of `Cargo.toml` at current working directory
  before checking 'DATABASE_URL' environment variable
2020-08-19 18:00:40 -07:00
Stuart Hinson
9b26d45344 application name test 2020-08-19 17:56:51 -07:00
Stuart Hinson
1ab815cc9b WIP pg application_name 2020-08-19 17:56:51 -07:00
Yusuke Tanaka
3076a2dc09 Fix typo 2020-08-17 20:39:52 -07:00
Stuart Hinson
2ec5ff06b0 Add --database-url to command line 2020-08-17 20:06:26 -07:00
drklee3
dfb096eaa7 docs(macros): Add missing closing bracket in code example 2020-08-15 18:32:38 -07:00
Jan Kuehle
106a6a8395
Support non-ASCII chars in postgres credentials
The `url` crate returns username and password portions of a URL as
percent encoded ASCII strings. In order to use them for the Postgres
connection, we need to decode them.
2020-08-13 15:50:07 +01:00
Matt Paul
9ed6428c8e Fix incorrect bash command 2020-08-10 18:22:10 -07:00
Julius de Bruijn
ae2e5db4b2 SQLite: Allow setting busy_timeout in options 2020-08-04 19:16:31 -07:00
Chloe Ross
5f3245d7f4 format: run cargo fmt 2020-07-31 04:14:48 -07:00
Chloe Ross
1949445cf0 other: don't deadname self 2020-07-31 04:14:48 -07:00
Chloe Ross
3885ae6ddf fix: allow queries that select just void to pass through macros as () instead of struct { _1: () } 2020-07-31 04:14:48 -07:00
Jannik Obermann
67142259e4 Fix #580 + Add test 2020-07-31 04:14:32 -07:00
吴翱翔
c5157c950d Add decimal feature to README.md 2020-07-31 04:13:28 -07:00
aspen
94413bd830 sqlx-cli: Exit with code 1 on error. 2020-07-29 12:04:12 -07:00
吴翱翔
96f4a43bb8 style: rustfmt 2020-07-29 07:39:31 -07:00
吴翱翔
c6fa9047b9 Remove rust_decimal unnecessary num-traits 2020-07-29 07:39:31 -07:00