Atkins
55c603e9e7
build(deps): bump git2 from 0.13.19 to 0.13.20 ( #1362 )
...
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
2021-08-07 01:48:10 -07:00
Atkins
9f7205e80f
Fix GitHub Actions and integration test ( #1346 )
...
* fix test suite
* rustfmt
* need Row
* test: fix integration test scripts and update the upstream supported databases
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* ci(actions): update supported databases
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* ci(actions): use `pg_isready` instead of `sleep` to avoid error cause by database not ready
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* feat(core): add `trait PgConnectionInfo` for connection parameter status from server
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* test(postgres): fix integration test for postgres
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* test(mysql): fix integration tests
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* ci(actions): test database against the oldest and newest supported versions
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* docs(core): document `trait PgConnectionInfo`
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
Co-authored-by: Montana Low <montanalow@gmail.com>
2021-07-28 14:00:34 -07:00
Daniel Faust
f0d0dce8e2
Use postgres as maintenance db unless maintaining postgres itself ( #1339 )
...
Fixes #1283 .
2021-07-23 16:39:25 -07:00
Luca Palmieri
34db44bffd
Mark the original DatabaseError as source. ( #1197 )
2021-07-23 16:31:49 -07:00
guylapid
dc92c28e68
Use tokio spawn_blocking instead of block_in_place ( #1333 )
...
This fixes a panic when sharing an SQLite connection pool between tokio runtime and actix runtime
2021-07-23 15:57:41 -07:00
Austin Bonander
b3ae6e50de
fix(macros): prefix generated variable names in query_as!() ( #1336 )
...
closes #1322
2021-07-21 17:24:39 -07:00
Austin Bonander
e89cb0971a
fix(macros): tell the compiler about external files/env vars to watch ( #1332 )
...
* fix(macros): tell the compiler about external files/env vars to watch
closes #663
closes #681
* feat(cli): add `migrate` subcommand for generating a build script
suggest embedding migrations on `sqlx migrate add` in a new project
2021-07-21 16:36:22 -07:00
Austin Bonander
a8544fd503
fix(pg_money): handle negative values correctly in PgMoney::from_decimal() ( #1334 )
...
closes #1321
2021-07-21 16:29:20 -07:00
Austin Bonander
531740550f
fix(pool): reimplement pool internals with futures-intrusive ( #1320 )
2021-07-21 16:28:44 -07:00
marshoepial
cb3ff28721
Keep track of column typing in SQLite EXPLAIN parsing ( #1323 )
...
* NewRowid, Column opcodes, better pointer handling
* Implement tracking of column typing on sqlite explain parser
* fmt for sqlite column typing for explain parsing
Co-authored-by: marshoepial <marshoepial@gmail.com>
2021-07-21 16:27:47 -07:00
Austin Bonander
8bcac0394f
fix(mysql): implement type traits for chrono::DateTime<Local> ( #1335 )
...
closes #1222
2021-07-21 16:27:00 -07:00
nomick
be189bd11e
Support MACADDR in Postgres ( #1329 )
2021-07-19 16:55:53 -07:00
Akhil Velagapudi
0abbcc510f
Update crc 1.8.1 -> 2.0.0 ( #1256 )
2021-07-16 15:25:32 -07:00
Austin Bonander
8204989191
doc(faq): fix wording for empty cases
2021-07-16 13:03:50 -07:00
Austin Bonander
b54adfad7c
doc(faq): empty array cases for ANY and ALL
2021-07-16 13:01:42 -07:00
Austin Bonander
6c8f61f07c
doc(faq): mention how to invert = ANY($1)
2021-07-16 12:57:52 -07:00
Austin Bonander
bb330f8e68
feat(docs): add an FAQ ( #1319 )
2021-07-14 14:29:42 -07:00
Jonas Platte
e33e4510fc
Fix error message about wildcard overrides ( #1276 )
...
Co-authored-by: Austin Bonander <austin@launchbadge.com>
2021-06-15 15:12:49 -07:00
Rohan Sharma
358b80f62e
Rename _expr to expr ( #1264 )
2021-06-01 12:20:12 -07:00
Jonas Platte
4986ea2e59
Improve root README.md and sqlx-cli/README.md ( #1262 )
...
* readme: Fix inconsistent list style
* readme: Improve text alignment
* readme: Fix missing links
* readme: Consistently use code formatting for runtime & TLS crates and dedup links
* readme: Add SQLx is not an ORM section
* readme: Improve documentation about offline mode
2021-05-30 15:52:25 -07:00
Ryan Leckey
694a2ac478
release: v0.5.5
v0.5.5
2021-05-24 09:34:34 -07:00
toshokan
eda78a7258
Fix infinite compile loop regression from recursive Lazy reference
2021-05-24 09:31:55 -07:00
Ryan Leckey
5d9c292132
release: v0.5.4
v0.5.4
2021-05-22 16:38:54 -07:00
Eamon Caton
b391d4878e
Revert webpki version bump to keep compatability with tokio-rustls feature
2021-05-22 11:03:01 -07:00
Jonas Platte
901f858fbc
sqlx-data.json removal prep work ( #1184 )
...
* macros: Reduce I/O
by doing all .env and environment variable reading inside a Lazy initializer.
* Use the default runtime and TLS backend for all examples
Before, rust-analyzer was always hitting the
"only one runtime can be enabled" compile_error in sqlx-rt.
2021-05-21 17:33:56 -07:00
Ryan Leckey
13f7c7124a
release: v0.5.3
v0.5.3
2021-05-21 17:27:15 -07:00
Ryan Leckey
f7d3617e1b
update CHANGELOG for 0.5.3
2021-05-21 17:22:50 -07:00
Ryan Leckey
2d38332137
fix: bring back accidentally removed methods on the Migrate trait as deprecated
2021-05-21 17:16:22 -07:00
Siddhant
012478d8b7
Added support for PgMoney type in sqlx macros
2021-05-21 16:48:33 -07:00
Nathan Roach
db09cb61e5
Adding Any support for Local chrono datetime for MySQL
2021-05-21 16:46:41 -07:00
Guy Lapid
18acba2358
Added any types for binary blobs and chrono NaiveDateTime
2021-05-21 16:46:26 -07:00
Rafael Epplée
0acb0e5eff
Add docs for rename_all attribute for Type derive macro ( #1212 )
...
* add missing closing bracket in doctest
* document rename_all attribute for Type derive
2021-05-21 16:12:16 -07:00
Austin Bonander
8f1d8c7e2f
more pool fixes ( #1211 )
...
* a task that is marked woken but didn't actually wake before being cancelled will instead wake the next task in the queue
* a task that wakes but doesn't get a connection will put itself back in the queue instead of waiting until it times out with no way to be woken
* the idle reaper now won't run if there are tasks waiting for a connection, and also uses
the proper `SharedPool::release()` to return validated connections to the pool so waiting tasks get woken
closes #622 , #1210
(hopefully for good this time)
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-05-17 19:24:40 -07:00
Feike Steenbergen
78a94240e6
Skip empty and commented pgpass entries ( #1216 )
...
While running an application a lot of warnings were printed about my
pgpass file, like:
Malformed line in pgpass file
This was due to the fact that my pgpass file contains whitespace and
comments to organize it in a better way.
This commit ensures we will ignore empty lines and lines that (barring
whitespace) start with a comment. This is in line with how PostgreSQL
treats these entries in the pgpass file:
- https://www.postgresql.org/docs/current/libpq-pgpass.html
- function passwordFromFile in src/interfaces/libpq/fe-connect.c
2021-05-10 16:18:13 -07:00
link2xt
405474b575
sqlite: add SqliteConnectOptions::shared_cache() ( #1177 )
...
This makes it possible to open database in shared cache mode without
having to construct `sqlite://` URL with `?cache=shared` flag.
2021-04-27 18:35:45 -07:00
Josh Triplett
b5928f6e7f
Export SqliteAutoVacuum so it can be used
2021-04-27 12:35:58 -07:00
Kitsu
be88631b5e
Remove redundant args default notice
2021-04-27 12:35:46 -07:00
Josh Triplett
d4a7217a56
Support setting sqlite page_size
...
The page size setting only takes effect if set before doing anything
else to the database.
2021-04-27 12:35:23 -07:00
Stephen W
212d235334
Try to make 'no queries found' message more clear ( #1191 )
...
* try to make 'no queries found' message more clear
* Be more polite
2021-04-26 00:40:33 -07:00
jtroo
5a8418e5fd
Fix query! documentation of .execute ( #1179 )
2021-04-20 17:22:47 -07:00
link2xt
fda55fe3b3
sqlite: export SqliteLockingMode
...
This makes it possible to `use sqlx::sqlite::SqliteLockingMode`.
2021-04-16 18:25:07 -07:00
Ryan Leckey
f7775f7fde
release: 0.5.2
v0.5.2
2021-04-15 18:40:46 -07:00
Jonas Platte
73d35e73a6
Remove Self: Type bounds in Encode / Decode implementations
2021-04-15 18:27:13 -07:00
Jonas Platte
81ae756e86
Fix warnings
2021-04-15 18:27:13 -07:00
link2xt
bd06836fba
test(sqlite): extend it_caches_statements() test
...
Test that initial PRAGMA statements and &str statements are not
cached, but sqlx::query() statements are cached by default.
2021-04-15 18:26:06 -07:00
Ryan Leckey
9e8e334697
chore: add std_rng to rand
2021-04-09 15:48:19 -07:00
Ryan Leckey
633a662752
chore: update dependencies
2021-04-09 00:31:07 -07:00
Ryan Leckey
98cd619157
style: rustfmt
2021-04-09 00:24:14 -07:00
Alexander Krotov
78656eb469
fix(sqlite): reset the statement when fetch_many() stream is dropped
...
Unlike `Executor.fetch_optional()`, `Executor.fetch_many()` does not
have a single exit. The stream can be dropped at any time. To catch
this event, we create a `StatementResetter` structure inside the stream
loop and reset the statement when it is dropped.
A test case `it_resets_prepared_statement_after_fetch_many` is
similar to `it_resets_prepared_statement_after_fetch_one` which tests
`Executor.fetch_optional()`.
2021-04-09 00:23:17 -07:00
link2xt
5cf1af2d19
fix(sqlite): do not ignore API misuse errors from sqlite3_finalize
2021-04-09 00:21:52 -07:00