Mike Ledger
627be88634
use Punctuated
2020-07-09 12:34:19 -07:00
Mike Ledger
bea5b8f612
fix warning
2020-07-09 12:34:19 -07:00
Mike Ledger
0a74b16f4f
support string concatenation in query*
2020-07-09 12:34:19 -07:00
Julius de Bruijn
dce7c71c37
Add macro extensions for Decimal
2020-07-09 12:32:19 -07:00
Ryan Leckey
8baeb9215a
fix: correct a couple places from the recent column metadata changes
2020-07-05 04:28:25 -07:00
Ryan Leckey
8d188c5f1a
feat: expose column information on Row
...
- add database-specific Column types: MySqlColumn, PgColumn, etc.
- add Row::columns() -> &[DB::Column]
- add Row::column(I) and Row::try_column(I)
2020-07-05 03:48:36 -07:00
Ryan Leckey
7d22c0917f
Merge remote-tracking branch 'meteficha/felipesere-rebased'
2020-07-04 04:37:11 -07:00
Ryan Leckey
0def87b689
fix(derives): lift requirement of Copy + Clone on weak enums
2020-07-04 03:14:42 -07:00
Ryan Leckey
6a251efb65
fix(mysql): enum type derive and column overrides need to deref before eq
2020-07-04 02:59:56 -07:00
Austin Bonander
17e88ac1a4
perf: implement pool benchmark, make fairness an option
2020-07-03 05:59:20 -07:00
Ryan Leckey
4c5ea7af77
Merge remote-tracking branch 'dimtion/pginterval'
2020-07-02 23:35:05 -07:00
Felipe Lessa
617d0e4ad4
Add SQLite chrono types to impl_database_ext.
2020-06-29 21:19:00 +01:00
Ryan Leckey
cfa833fa0d
fix(sqlite): fallback to storage class when typing expressions and infer INTEGER as i64
2020-06-27 19:17:46 -07:00
Ryan Leckey
331b92dee7
Revert "refactor(derives): use separate impls per database"
...
This reverts commit e3483230e04a244181c67a0b7752d2406923b12c.
2020-06-27 18:55:10 -07:00
Loïc Carr
71cb68b2f4
feat(postgres) Create bindings for PgInterval
2020-06-27 17:36:06 -07:00
Ryan Leckey
e3483230e0
refactor(derives): use separate impls per database
...
database-generic impls are *mostly* impossible in SQLx so we recently
capitalized on that and made it *totally* impossible (until Rust
has specialization and lazy norm)
2020-06-27 05:30:38 -07:00
Austin Bonander
36a53b44cd
fix(macros): don't emit typechecking code for explicit type overrides on bind params
2020-06-21 06:06:53 -07:00
Austin Bonander
f2515e2472
feat(macros): support nullable column override
2020-06-21 06:06:53 -07:00
Austin Bonander
7b37ebde0f
fix(macros): forbid casts to _
in bind parameters
2020-06-21 06:06:53 -07:00
Austin Bonander
14023e8e6e
feat(macros): support wildcard in bind param type overrides
2020-06-21 06:06:53 -07:00
Austin Bonander
eb831382e5
feat(macros): type override annotations for columns
2020-06-21 06:06:53 -07:00
Ryan Leckey
aaa475cc33
refactor: move Decode::accepts to Type::compatible
2020-06-21 03:55:31 -07:00
Daniel Akhterov
639e10248e
feat: add boolean support to sqlx-macros/mssql
2020-06-16 13:40:53 -07:00
Ryan Leckey
c9f3e1adca
feat(postgres): add support for built-in range types and allow derives to handle custom range types
...
Co-authored-by: Caio <c410.f3r@gmail.com>
2020-06-12 15:33:19 -07:00
Ryan Leckey
fedd883d91
style: rustfmt
2020-06-12 15:33:19 -07:00
Caio
d4329e98d4
refactor: prepare to support postgres ranges
...
- Remove Type bound from Encode + Decode which removes the defaults
for produces() and accepts(). This allows custom type implementations
to be more flexible.
2020-06-12 15:33:19 -07:00
Austin Bonander
646823e093
fix(macros): fix derive for Encode
2020-06-11 03:36:34 -07:00
Ryan Leckey
6497d67b6a
feat(mssql): add macro support
2020-06-07 16:29:46 -07:00
Austin Bonander
80b4e2fca6
fix(macros): reintroduce and fix macro tests for MySQL
2020-06-05 21:02:24 -07:00
Austin Bonander
bddb2e560f
fix(macros): fix macros for Postgres
2020-06-05 20:28:21 -07:00
dignifiedquire
9b68eb19ef
fix(sqlx-macros): update trait definitions
2020-06-05 19:49:31 -07:00
Ryan Leckey
a3053119fa
fix: expose runtime-actix in sqlx/Cargo.toml
2020-06-01 05:34:52 -07:00
Ryan Leckey
51ae9f00e7
chore: bump version to 0.4.0-pre
2020-05-30 23:15:52 -07:00
Ryan Leckey
d4d994bae4
fix: found a few more changes needed in internal core usage in macros
2020-05-30 18:11:05 -07:00
Ryan Leckey
e8aa127c55
fix: tweak sqlx-core usage in macros after the latest massive refactor
2020-05-30 17:56:19 -07:00
Ryan Leckey
e5b6047009
feat: introduce docker-compose based testing for running locally against many database combinations
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
a54b1267f6
refactor(macros): adapt to the 0.4.x core refactor
2020-05-30 17:51:49 -07:00
Austin Bonander
1bdc3e9057
cargo sqlx prepare
: fix to consistently trigger recompile
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
a44e29c84c
remove superfluous "TODO"
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
Blaine Bublitz
33915ae3ad
Add uppercase support for Type macro
2020-05-20 20:33:03 -07:00
Ryan Leckey
cbccd68963
chore: prepare v0.3.5
2020-05-06 03:30:35 -07:00
Dan B
e7c1486005
Add support for crate specific .env files
...
This change will attempt to load an .env file from CARGO_MANIFEST_DIR, if it exists.
For backwards compatibility, if the .env file does not exist, we will fall back to default dotenv behaviour.
Resolves #267
2020-04-24 15:40:20 -07:00
Josh Holmer
8b78680d9c
Add snake_case rename support for Type macro
...
I encountered a use case while converting a project
from Diesel to sqlx, where I had a custom Postgres enum
which included a snake case field name:
```rust
pub enum JobStatus {
NotRun,
Finished,
Failed,
}
```
Which translates to:
```sql
CREATE TYPE job_status AS ENUM ('not_run', 'finished', 'failed');
```
This is likely to be a semi-common use case,
so this commit adds snake case support for enums
via the `#[sqlx(rename_all = "snake_case")]` attribute.
2020-04-17 03:59:19 -04:00
meh
bfc52ca2f4
Add query_unchecked and query_file_unchecked macros
2020-04-16 09:54:09 -07:00
Ryan Leckey
90fd35745c
Prepare v0.3.4
2020-04-10 15:56:13 -07:00