* 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
* 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
* 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
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.
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.
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.
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.
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