Dennis Schubert
b283a31e4b
Correct mention of the tls-native-tls
in the documentation. ( #2593 )
2023-07-08 12:42:50 -07:00
Luiz Carvalho
4095ac44ae
chore: add deprecation notice for type ascription use ( #2483 )
...
* chore: add deprecation notice for type ascription use
* docs: type ascription deprecation
2023-05-04 12:58:57 -07:00
df51d
a622f044ef
fix(docs): example of sqlx_macros_unstable
in config.toml
2023-03-16 17:03:14 -07:00
Craig Bester
96c8b12485
feat(prepare): move to one-file-per-query for offline mode
...
Co-authored-by: Jonas Platte <jonas@lumeo.com>
2023-03-01 19:17:21 -08:00
kenkoooo
291e79abae
fix(docs): example code for sqlx::test
2023-03-01 19:12:00 -08:00
Austin Bonander
b5312c3b6f
Break drivers out into separate crates, clean up some technical debt ( #2039 )
...
* WIP rt refactors
* refactor: break drivers out into separate crates
also cleans up significant technical debt
2023-02-21 13:25:25 -08:00
Chris Foster
c828fb5a19
Fixed typo. ( #2156 )
2023-02-01 16:54:18 -08:00
fuzzbuck
18a76fbdbf
customizable db locking during migration ( #2063 )
...
* customizable db locking during migration
* Update sqlx-core/src/migrate/migrator.rs
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* [migrator.rs] cargo fmt
* fix Migrator 'locking' param doctest fail
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2022-09-06 13:42:56 -07:00
Austin Bonander
7809ff4b86
fix(docs): remove mention of subcommand that wasn't added
...
I intended to add subcommands to `sqlx-cli` to manage test databases but I wanted to get #2001 finished and out the door so we can start using it ASAP.
2022-08-02 19:16:32 -07:00
Austin Bonander
054f61980a
feat: implement testing utilities ( #2001 )
2022-08-02 14:38:12 -07:00
Rob Ede
7adbb7fefc
refactor: remove direct actix-rt support ( #1679 )
...
actix- runtime feature flags are now aliases for tokio- flags
2022-08-01 21:48:40 -07:00
Austin Bonander
a2eceec33b
chore: replace dotenv
with dotenvy
( #2003 )
...
* chore: replace `dotenv` with `dotenvy`
The former appears to be unmaintained and the latter is a drop-in replacement.
* chore: fix all warnings
2022-07-28 14:33:44 -07:00
Austin Bonander
d7277f41eb
docs: clarify relationship between query_as!
and FromRow
( #1977 )
2022-07-15 13:06:37 -07:00
Austin Bonander
a46e370c94
feat: document and expand query builder ( #1790 )
...
elaborates on the API introduced in #1780
2022-04-12 13:22:47 -07:00
crajcan
a470682572
Add Query builder ( #1780 )
...
* Add Query builder
* Make query_builder.rs in sqlx-core
* Add QueryBuilder::new()
* Add QueryBuilder::push()
* Define questions for documentation
* Get new, push, push_bind working with types
* Handle postgres' numbered bind varaibles
* Add a test for QueryBuilder#build
* Move arguments into Option
* Refactor query builder
* Finish testing QueryBuilder#build
* Remove design doc
* Add a test for pushing strings with push_bind
* Integration test green
* Adjust some tests
* Make query builder generic about placeholder segmenent ('$N' or '?')
* Run fmt
* Redesign Arguments#format_placeholder in line with code review
* Use write! to push sql to QueryBuilder
* Add QueryBuilder::reset to allow for QueryBuilder reuse
* Run cargo fmt
2022-04-08 13:36:42 -07:00
Malhar Vora
cc35809708
Address #1718 ( #1719 )
...
Fix broken link
2022-02-22 12:16:43 -08:00
k-jun
c90d2714ff
docs(macros): remove sentences banning usage of as _
( #1619 )
...
* docs(macros): remove sentents banning `as _`
* fix(macros): comment
* Update src/macros.rs
* Update src/macros.rs
Co-authored-by: keijun-kumagai <keijun.kumagai@dena.com>
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2022-02-15 21:13:39 -08:00
p9s
f3ac717977
Update macros.rs ( #1657 )
...
typo fix
2022-02-07 20:02:14 -08:00
Douman
04109d9323
Reimport Either used in Executor ( #1562 )
...
* Reimport Either used in Executor
* Re-import sqlx-core
* Update src/lib.rs
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
* Apply fmt
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2021-12-29 13:01:16 -08:00
Zbigniew Żołnierowicz
ce801b9330
Include a reference to the shape of the migration files in the migrate macro documentation ( #1498 )
2021-11-08 19:02:01 -08:00
Jonas Platte
335eed4545
Add executor trait "aliases" ( #1412 )
2021-08-31 17:36:27 -07:00
Rafael Epplée
e77219f7c7
Add docs for fetch_all, example for postgres transactions ( #1255 )
...
* reference fetch_all() in query macros
* add example for using transactions in postgres
2021-08-16 16:33:42 -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
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
jtroo
5a8418e5fd
Fix query!
documentation of .execute
( #1179 )
2021-04-20 17:22:47 -07:00
Chris Pick
c83427f8fc
Fix sqlx-cli
crate link ( #1139 )
...
Co-authored-by: Chris Pick <chris@chrispick.com>
2021-03-26 21:40:32 -07:00
Austin Bonander
89305873b0
fix(postgres): patch nullable inference in Postgres using EXPLAIN
...
BREAKING CHANGE: some columns in `query!()` et. al. output will change from `T` to `Option<T>`
breakage should be minimal in practice as
these columns will need to have been manually
overridden anyway to avoid runtime errors
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-20 22:27:44 -08:00
Austin Bonander
7c32928ebc
feat(macros): implement query_scalar!()
and variants
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-20 22:23:04 -08:00
Ryan Leckey
d5e0f1b92b
refactor: rename DbOutcome to DbQueryResult
2021-01-20 21:57:26 -08:00
Jonas Platte
08a76f45ae
Rename DbDone to DbOutcome
2021-01-12 14:45:01 +01:00
Jonas Platte
a1d562f04b
Remove the Done trait
2021-01-12 14:37:44 +01:00
Jonas Platte
b3f78b8255
Add a trybuild test for sqlx(rename) deprecation warning
2021-01-12 03:39:10 -08:00
Jonas Platte
e2f7aa2eca
Restore support for sqlx(rename) on types, with a deprecation warning
2021-01-12 03:39:10 -08:00
Jonas Platte
9eca6413fe
Remove TryMapRow and MapRow
...
These traits were a workaround for a bug in rustc that an earlier
revision of the API triggered, but the API has since been changed.
2021-01-05 23:50:23 -08:00
Chloe Ross
2890d154a3
doc: use the fancy new intra-crate doc links everywhere
2021-01-04 18:39:03 -08:00
Austin Bonander
ef6c73c985
doc: add tables describing the right method to call on query!()
et al
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-01-04 12:03:42 -08:00
Marcin Kaźmierczak
7f1bff406d
fix clipyy warnings
2020-11-24 16:15:22 -08:00
Jonas Platte
b14266ba2e
Add rustls support
2020-11-12 07:32:59 -08:00
Jonas Platte
a161bcba05
Rename cargo features in preparation for rustls support
2020-11-12 07:32:21 -08: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
drklee3
dfb096eaa7
docs(macros): Add missing closing bracket in code example
2020-08-15 18:32:38 -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
Raphaël Thériault
ced09e0545
Support using both nullability and type overrides ( #549 )
...
* Make it possible to use both nullability and type overrides
* Fix override parsing lookahead logic
* Update column override tests
* Support nullability overrides with wildcard type overrides
* Fix tests
* Update query! overrides docs
* Remove last bits of macro_result!
* rustfmt
2020-07-27 00:43:35 -07:00
Ryan Leckey
d06de149a0
fix: get MatchBorrow type check working for references 3 deep
2020-07-26 23:07:12 -07:00
Ryan Leckey
f298eb3cf1
Merge remote-tracking branch 'raftario/embedded-migrations'
2020-07-26 18:03:59 -07:00
Ryan Leckey
86d41f17aa
Merge remote-tracking branch 'origin/ab/macro-refresh'
2020-07-26 17:54:23 -07:00
Ryan Leckey
40f0a22765
Merge remote-tracking branch 'magurotuna/doc-links'
2020-07-24 07:33:27 -07:00
Ryan Leckey
e575501a39
feat: add Executor::prepare, a hook into the automatic statement preparation life-cycle
2020-07-24 07:24:23 -07:00
Austin Bonander
41bf5e30ee
docs(macros): mention interpreting EXPLAIN
output for SQLite
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-23 20:19:08 -07:00
Raphaël Thériault
92646e00b8
Fix migrate! and add migration test
2020-07-23 17:46:27 -04:00