* fix(cli): change new `rustls` and `native-tls` features to use correct runtime feature
* chore: upgrade SQLx crates to 0.5.10, upgrade all dependencies to latest versions
chore(cli): upgraded `clap` to `3.0.0-rc.9`
* fix(tests/sqlite): ignore `issue_1467()` as spuriously failing
I'm well aware of the principle that a spuriously failing test is a failing test, but even though I have it outputting the seed used with a reproducible PRNG, I can't reproduce the failures locally, so 🤷.
* chore: add CHANGELOG entry for 0.5.10
* feat(postgres): add an option to specify extra options ...
... this allow you to specify stuff like search path and statement
timeouts etc.
* feat(postgres): set options through setting run-time parameters
* feat(postgres): use flat command-list instead of hashmap
* feat(postgres): make the options taking parameters with `Display` trait
This commit fixes the array decoder to support custom types. The core of the issue was that the array decoder did not use the type info retrieved from the database. It means that it only supported native types.
This commit fixes the issue by using the element type info fetched from the database. A new internal helper method is added to the `PgType` struct: it returns the type info for the inner array element, if available.
Closes#1477
* fix(postgres): Fixes pgpass so it applies after parsing and matches usernames & databases correctly
* chore: Updated unit test
* refactor: Previous semantics of PgConnectOptions::default()
* refactor: formatting
deno_core currently uses `=1.6.2` for indexmap, and Cargo refuses to resolve a version with sqlx's requirement of 1.7.0.
004d07dccd/core/Cargo.toml (L18)
* add explicit shutdown of sqlite statement worker in Connection::close()
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* test sqlite database close method
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* await worker shutdown after dropping SqliteConnection
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* restore explicit drop
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
* Support custom initial options for sqlite
Apply suggestions from code review
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
Apply suggestions from code review
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
Use order-preserving map to set pragmas for an initial sqlite statement
Use Cow<'static, str> instead of String
Co-authored-by: Austin Bonander <austin@launchbadge.com>
* fix: wait until ready after executing other helper queries while pg quering is executing
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* fix: use tls parameter for testing target
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
* sqlite: use Arc instead of Copy-able StatementHandle
This guarantees that StatementHandle is never used after calling
`sqlite3_finalize`. Now `sqlite3_finalize` is only called when
StatementHandle is dropped.
(cherry picked from commit 5eebc05dc371512bae14cf94498087bdadeddec0)
* sqlite: use Weak poiter to StatementHandle in the worker
Otherwise some tests fail to close connection.
(cherry picked from commit 5461eeeee30772e54e8874f60805b04bdc989278)
* Fix segfault due to race condition in sqlite (#1300)
(cherry picked from commit bb62cf767e3e44896bf4607da8e18237241ed170)
* fix(sqlite): run `sqlite3_reset()` in `StatementWorker`
this avoids possible race conditions without using a mutex
* fix(sqlite): have `StatementWorker` keep a strong ref to `ConnectionHandle`
this should prevent the database handle from being finalized before all statement handles
have been finalized
* fix(sqlite/test): make `concurrent_resets_dont_segfault` runtime-agnostic
Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: Adam Cigánek <adam.ciganek@gmail.com>