Ryan Leckey
0a04abdb3e
feat: Pool is now generic over Database, as opposed to Connection
...
this fixes an unfortunate interaction with HRTBs where the compiler would
produce infinitely nested PoolConnection<PoolConnection<....
2020-05-30 17:51:55 -07:00
Ryan Leckey
cf7606be1b
fix: Transaction now to rollbacks on drop (again)
2020-05-30 17:51:55 -07:00
Ryan Leckey
bb3b571a57
fix: tweak lifetimes in Executor to limit the scope for the borrow on the query to the single execution
2020-05-30 17:51:55 -07:00
Ryan Leckey
cc9d443434
feat: re-introduce Transaction
...
* Transaction now wraps `&mut Connection` instead of `Connection`
2020-05-30 17:51:55 -07:00
Ryan Leckey
9d2a0141cb
feat: introduce IntoArguments, query_with, query_as_with, and query_scalar_with
2020-05-30 17:51:55 -07:00
Ryan Leckey
88532ffc28
refactor: clean up warnings
2020-05-30 17:51:49 -07:00
Ryan Leckey
a54b1267f6
refactor(macros): adapt to the 0.4.x core refactor
2020-05-30 17:51:49 -07:00
Ryan Leckey
eaa7fba9d4
refactor(postgres): adapt to the 0.4.x core refactor
2020-05-30 17:49:30 -07:00
Ryan Leckey
2966b655fc
refactor(mysql): adapt to the 0.4.x core refactor
2020-05-30 17:48:10 -07:00
Ryan Leckey
37a69e0ac3
refactor(sqlite): adapt to the 0.4.x core refactor
...
* massive (~20x) performance improvement
2020-05-30 16:09:50 -07:00
Ryan Leckey
757a930e21
refactor(core): remove the HRTB (higher rank trait bound) on Row in the aim of improving ergonomics
...
* removes the lifetime from Row
* removes MySqlQueryAs, SqliteQueryAs, etc. (no longer needed)
* introduce query_scalar
* introduce Decode::accepts to allow overriding runtime type checking
per-type (replaces TypeInfo::compatible)
* introduce Encode::produces to allow overriding the encoded type per-value
* adds a lifetime to Arguments (and introduce the HRTB HasArguments)
to support zero-copy encoding with SQLite
* renames Database::RawBuffer to HasArguments::ArgumentBuffer
* introduce Connect::connect_with to provide an ConnectOptions type
explicitly to opt-out of connection string parsing
* introduce Value and ValueRef traits to allow decoding-deferred
extraction of values from Rows
* introduce Encode::encode_by_ref and change Encode::encode to take
by-value to try and re-use memory where possible
* use thiserror to generate sqlx::Error
* [!] temporarily removes query logging
* [!] temporarily removes transactions
2020-05-30 16:09:08 -07:00
Ryan Leckey
a233fbfdb7
feat(rt): introduce sqlx-rt to centralize supported runtimes
2020-05-30 16:07:02 -07:00
dyoshikawa
086dfec002
Fix the example code in README.
2020-05-30 16:05:43 -07:00
Austin Bonander
1bdc3e9057
cargo sqlx prepare: fix to consistently trigger recompile
2020-05-30 16:02:37 -07:00
Austin Bonander
119167e13a
cargo sqlx prepare: delete query-*.json files as they're read
2020-05-30 16:02:37 -07:00
Austin Bonander
07639a61ac
sqlx-cli/README.md: document that <command> --help exists
2020-05-30 16:02:37 -07:00
Austin Bonander
9729385257
sqlx_cli::db::run_drop: actually print the database name in confirm
2020-05-30 16:02:37 -07:00
Austin Bonander
35fd6f64cc
allow cargo sqlx prepare to pass trailing args to Cargo
...
remove unused import
2020-05-30 16:02:37 -07:00
Austin Bonander
2a6f1a24ea
document offline mode for query!()
2020-05-30 16:02:37 -07:00
Austin Bonander
03773d0065
sqlx-macros: simplify query_macros module name, delete unused file
2020-05-30 16:02:37 -07:00
Austin Bonander
41dd286356
set sqlx-cli license to MIT/Apache 2.0
2020-05-30 16:02:37 -07:00
Austin Bonander
7dae3dbf57
rename cargo-sqlx -> sqlx-cli
...
edit README
2020-05-30 16:02:37 -07:00
Austin Bonander
a44e29c84c
remove superfluous "TODO"
2020-05-30 16:02:37 -07:00
Austin Bonander
676b29efe3
add basic integration test for cargo-sqlx
2020-05-30 16:02:37 -07:00
Austin Bonander
6b248e0d5f
get offline macros working with todos example
2020-05-30 16:02:37 -07:00
Austin Bonander
21041ff55e
implement cargo sqlx prepare
...
also organize code more clearly in `cargo-sqlx`
2020-05-30 16:02:37 -07:00
Austin Bonander
6913695588
add support for building in "decoupled" mode
2020-05-30 16:02:37 -07:00
Jesper Axelsson
a9fb19b37d
Add .env to ignore file
2020-05-27 13:03:51 -07:00
Jesper Axelsson
83ab26c5c5
Formatting and fix typo
2020-05-27 13:03:51 -07:00
Jesper Axelsson
6117957b79
Quote quotation marks
2020-05-27 13:03:51 -07:00
Jesper Axelsson
e0b782fc42
Allow sql and env files again
2020-05-27 13:03:51 -07:00
Jesper Axelsson
d6d801de3c
Quote postgres drop/create database
2020-05-27 13:03:51 -07:00
Jesper Axelsson
8882f80548
Update readme
2020-05-22 13:17:53 -07:00
Jesper Axelsson
4681285fe1
Add support for mysql
2020-05-22 13:17:53 -07:00
Blaine Bublitz
28c639fd84
Seems like postgres needs tests like this
2020-05-20 20:33:03 -07:00
Blaine Bublitz
03ba5ca434
I think postgres needs this
2020-05-20 20:33:03 -07:00
Blaine Bublitz
2ffbe2f06e
More copy-paste errors
2020-05-20 20:33:03 -07:00
Blaine Bublitz
84f4ab5799
Attempt to fix copy-paste errors
2020-05-20 20:33:03 -07:00
Blaine Bublitz
e5b6754ac6
fix failures
2020-05-20 20:33:03 -07:00
Blaine Bublitz
7283e690ff
rustfmt
2020-05-20 20:33:03 -07:00
Blaine Bublitz
168ce9bed0
Attempt to add integration tests
2020-05-20 20:33:03 -07:00
Blaine Bublitz
33915ae3ad
Add uppercase support for Type macro
2020-05-20 20:33:03 -07:00
吴翱翔
77cdafe08a
Fix a misspelling in MySQL types document
2020-05-15 12:46:35 -07:00
PumpkinSeed
19edb73ffc
Add meaningful errors
2020-05-15 12:45:32 -07:00
Ryan Leckey
cbccd68963
chore: prepare v0.3.5
v0.3.5
2020-05-06 03:30:35 -07:00
meh
7b1cc7fd09
Derive Serialize and Deserialize for Json
2020-05-06 00:13:19 -07:00
Milan Zivkovic
a034df87c4
fix issue with project name
2020-04-30 21:16:45 -07:00
Milan Zivkovic
3edf84ae3d
Todo API example using Actix-web and SQLx with PostgreSQL database
2020-04-30 21:16:45 -07:00
Walther Chen
c9c82b06c1
readme example typo
...
I believe `.build()` takes `&str`, but `env:var()` returns ` Result<String, VarError>`
2020-04-30 21:15:33 -07:00
Austin Bonander
c285e28670
fix and test handling of 0 for BigDecimal in Postgres/MySQL
...
closes #283
2020-04-28 11:54:41 -07:00