Commit graph

2220 commits

Author SHA1 Message Date
Paolo Barbolini
37fdc2043b
Update bitflags to v2 (#2564) 2023-06-30 12:34:33 -07:00
Paolo Barbolini
713da5b7b0
Bump indexmap and ahash (#2565) 2023-06-30 12:32:46 -07:00
Tim Geoghegan
0c8fe729ff
Traverse symlinks when resolving migrations (#2445)
* Traverse symlinks when resolving migrations

When enumerating the source directory seeking migration files, `sqlx`
ignores entries that aren't files. This was previously reported as #614
and fixed in #985 but apparently regressed somewhere along the way. This
commit reintroduces the fix from #985 to the current implementation: use
`std::fs::metadata` instead of `std::fs::DirEntry::metadata`. The former
is documented to traverse symlinks; the latter does not.

* add migrations_symlink test
2023-06-13 11:21:09 -07:00
tyrelr
238a95b0f3
Sqlite analytical (#2508)
* Add failing tests

* remove unnecessary functions, clarify function names

* simplify access to cursor columns with helper methods

* split table info from cursor info so that cursors can share table info

* fix test expectations
2023-06-12 12:48:32 -07:00
Wesley Norris
d750f28ef0
Bump mac_address to 1.1.5 (#2515) 2023-06-12 12:44:55 -07:00
Southball
de90a55253
Use ::std::result::Result::Ok in output.rs (#2519) 2023-06-12 12:44:37 -07:00
Austin Bonander
253d8c9f69
0.7.0-alpha.3 release 2023-05-11 16:49:24 -07:00
Mauro D
af0f04a108
Bump to libsqlite3-sys 0.26 (#2496) 2023-05-11 15:43:52 -07:00
Sergio Benitez
8f4063c511
Update rustls to 0.21, webpki-roots to 0.23 (#2440) 2023-05-11 15:19:24 -07:00
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