Commit graph

2211 commits

Author SHA1 Message Date
tyrelr
0dfebb202f
Add and improve sqlite describe performance benchmarks (#2467)
* add basic describe benchmarks

* separate memory from query state

* move branch tracking & deduplication logic into a dedicated BranchList class

* Convert to using IntMap

* move intmap to a separate module, drop dead code, clean up function names

* Update Cargo.lock

* skip branches to check foreign keys, as they generally shouldn't impact query result type
2023-05-08 12:44:28 -07:00
Philip Kannegaard Hayes
1227d5d168
fix: ensure fresh test db's aren't accidentally deleted by do_cleanup (#2454)
If the first test thread is a bit slow after it acquires the
`DO_CLEANUP` permit, it can accidentally delete a fresh test db created
by another thread right before that other thread has a chance to open
its connection.

This fix simply records the current timestamp _before_ we acquire the
`DO_CLEANUP` permit and only cleans up test db's created before then.
2023-05-04 13:23:04 -07:00
Midas Lambrichts
cbf8dd37e9
Add Simple format for Uuid for MySQL & SQLite. (#2469)
* Add Simple format for Uuid for MySQL & SQLite.

Copy pasted the implementation for `Hyphenated` and adapt.

* Add uuid Simple docs for SQLite
2023-05-04 13:14:06 -07:00
Utkarsh Gupta
003878698e
chore(sqlx-postgres): replace dirs with home & etcetera (#2485) 2023-05-04 13:12:54 -07:00
vizvasrj
200e17bb04
in README.md, correct spelling and grammar (#2453)
* in README.md, correct spelling and grammar

* Update README.md

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

* Update README.md

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

* Update README.md

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

* Update README.md

missing article (the) in line 274

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2023-05-04 12:59:35 -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
tyrelr
39acaf1459
limit the number of instructions that can be evaluated (#2459)
* limit the number of instructions that can be evaluated

* code cleanup
2023-05-04 11:46:11 -07:00
Nicolas Stinus
dc9e298bff
fix(sqlx-core): allow time::OffsetDateTime to be built from sqlite's CURRENT_TIMESTAMP (#2285)
SQLite's CURRENT_TIMESTAMP keyword fills a DATETIME column as a UTC expressed
string in the following format: "YYYY-MM-DD HH:MM:SS".

Unfortunately, this format lacks the timezone information to safely build
a time::OffsetDateTime.

If all else fails, this patch will try to build it by assuming the missing
timezine is UTC.
2023-05-01 15:05:40 -07:00
Nisheeth Barthwal
4f1ac1d606
add progress handler support to sqlite (#2256)
* rebase main

* fmt

* use NonNull to fix UB

* apply code suggestions

* add test for multiple handler drops

* remove nightly features for test
2023-03-24 14:27:16 -07:00
Paolo Barbolini
14d70feab1 Enable runtime-tokio of sqlx when building sqlx-cli 2023-03-24 00:28:16 -07:00
patix
9ac2cb3ace fix(macros-core): use of undeclared tracked_path 2023-03-20 14:12:41 -07:00
Alexander Lyon
bd3eb94737 fix(#2407): respect the HaltIfNull opcode when determining nullability 2023-03-20 14:12:20 -07:00
Austin Bonander
15458fa9d6
fix: update docs.rs features metadata 2023-03-16 17:11:46 -07:00
Austin Bonander
ec60b1d32d fix: replace use of deprecated chrono APIs 2023-03-16 17:03:14 -07:00
Austin Bonander
0f6c377c12 fix: replace use of deprecated base64 functions 2023-03-16 17:03:14 -07:00
Austin Bonander
d43257e18a chore: cleanup, fix all non-deprecation warnings 2023-03-16 17:03:14 -07:00
Austin Bonander
aa6c6d9752 fix(docs): update README for 0.7.0, note alpha cycle 2023-03-16 17:03:14 -07:00
df51d
a622f044ef fix(docs): example of sqlx_macros_unstable in config.toml 2023-03-16 17:03:14 -07:00
Austin Bonander
551d622cc1 0.7.0-alpha.2 release 2023-03-16 17:03:14 -07:00
Coda Hale
bce16a5c1d fix: drop old time 0.1.44 dep
chrono 0.4's default features include the `oldtime` feature which pulls in time 0.1.44.
This is an unmaintained version with soundness issues (time-rs/time#293) and is rarely needed.
If downstream users require this dependency, they can enable the feature themselves.
2023-03-14 18:07:52 -07:00
Austin Schey
cf3ce13d27 fix(prepare): store temporary query files inside the workspace 2023-03-14 17:25:24 -07:00
Gregor Giesen
70934d7cd2 Docs of FromRow -> skip attribute updated as suggested by @abonander
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2023-03-13 18:06:44 -07:00
Gregor Giesen
6713e8cdaa Docs for skip attribute of FromRow macro 2023-03-13 18:06:44 -07:00
Gregor Giesen
cc91986a42 fixed cargo format check 2023-03-13 18:06:44 -07:00
Gregor Giesen
03de69bcaa test for FromRow -> skip attribute 2023-03-13 18:06:44 -07:00
Gregor Giesen
665b859645 derive FromRow: added attribute skip for setting default value 2023-03-13 18:06:44 -07:00
Blair Noctis
c03926c741 fix: lower default logging level for statements to Debug 2023-03-10 17:58:14 -08:00
grantkee
aff632a9ec bump libsqlite3-sys to patched version 2023-03-10 14:37:09 -08:00
Daniel Beckwith
cea7228fe0 Remove invalid impl 2023-03-10 14:36:46 -08:00
Daniel Beckwith
0b192cfda6 Add From impls for Json 2023-03-10 14:36:46 -08:00
Vladimir
5a8cd959c2 fix test 2023-03-08 18:55:53 -08:00
Vladimir
4b8fa7a4d7 feat: support new types in sqlx::query_as! 2023-03-08 18:55:53 -08:00
Vladimir
d81b6fc08d fix: sqlx-postgres bigdecimal feature 2023-03-08 18:55:53 -08:00
Bram Geron
1ff6a2ac94 feat: support calling PostgreSQL procedures with the macros
Fixes #1449 (I think). I verified that the code fixes the new test.

I used INOUT in setup.sql because older versions of Postgres don't
support OUT parameters.
2023-03-03 19:36:39 -08:00
Nikhil Benesch
bb2baf2183 Don't run EXPLAIN nullability analysis on Materialize
Materialize [0] is a PostgreSQL-like database that, similar to
CockroachDB, does not support PostgreSQL's `EXPLAIN` output. Extend the
fix from PR #1248 to Materialize, too, so that sqlx can still be used
with Materialize.

See #1248.

[0]: https://materialize.com
2023-03-03 19:36:12 -08:00
Austin Bonander
c4b835c23a feat: add Connection::shrink_buffers, PoolConnection::close
closes #2372
2023-03-03 16:50:27 -08:00
Danilo Bargen
728280a2a3 README: Link build badge to workflow runs 2023-03-03 16:50:13 -08:00
Danilo Bargen
b61677d740 README: Fix build badge 2023-03-03 16:50:13 -08:00
Jayson Reis
82ff8d96b3 chore: Use tracing's fields to get structured logs
This also enables on services that can query this data to get useful metrics
2023-03-02 17:35:14 -08:00
Sergei Ivankov
21c2660062 Disable rustls crate logging feature by default 2023-03-01 19:17:35 -08:00
Craig Bester
3f2ec6f91a chore: update documentation to replace sqlx-data.json with .sqlx 2023-03-01 19:17:21 -08:00
Craig Bester
c6b372fdf0 chore: test macros' offline mode in CI
Co-authored-by: Austin Bonander <austin@launchbadge.com>
2023-03-01 19:17:21 -08: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
1fb1945aea fix(pool): close when last handle is dropped, extra check in try_acquire
closes #1928
closes #2375
2023-03-01 18:41:30 -08:00
Paolo Barbolini
c17c59fc4c Update dependencies 2023-02-22 15:49:46 -08:00
Craig Bester
9677430d67 fix: implement AnyConnectionBackend::as_migrate for databases 2023-02-22 15:09:41 -08:00
Craig Bester
a942f5316e fix: install default drivers before sqlx-cli create/drop 2023-02-22 15:09:41 -08:00
Craig Bester
006da611e1 fix: uncomment sqlx-cli database, default features 2023-02-22 15:09:41 -08:00
Austin Bonander
f05c884cdc
fix: remove readme entries for sqlx-mysql, sqlx-postgres, sqlx-sqlite 2023-02-21 15:44:03 -08:00