Ryan Leckey
20229ea2b9
fix: actually use TryMapRow and MapRow in Query
2020-07-02 23:03:14 -07:00
Ryan Leckey
5d6516da68
fix: re-add MapRow and TryMapRow to fix HRTB normalization when more than one driver is in-use
2020-07-02 23:00:46 -07:00
Ryan Leckey
c7c46f237b
fix(sqlite): argument bind for sqlite is 1-indexed
...
fixes #467
2020-07-02 22:52:33 -07:00
Ryan Leckey
1a7480774b
fix(postgres): after closing a statement, the connection should await CloseComplete
2020-07-02 22:37:04 -07:00
Julius de Bruijn
24d626b883
Reveal SQLite's extended error code
2020-07-01 09:33:18 -07:00
Peter Maatman
eda0b7dea4
mysql: Fix decoding of TIME '00:00:00.000000'
...
Fixes #418
2020-06-29 04:33:25 -07:00
Ryan Leckey
e4005bb53d
fix(mssql): handle errors without breaking the stream
2020-06-27 20:46:25 -07:00
Ryan Leckey
cfa833fa0d
fix(sqlite): fallback to storage class when typing expressions and infer INTEGER as i64
2020-06-27 19:17:46 -07:00
Ryan Leckey
513d666217
fix(any): support binding nulls in the any driver
2020-06-27 18:56:33 -07:00
Ryan Leckey
0b34545608
Revert "refactor: remove several blanket impls to allow more customization"
...
This reverts commit eb26e9f557
.
2020-06-27 18:54:50 -07:00
Ryan Leckey
f9d961ae1d
fix(any): rework decode and encode to not use blanket impls
2020-06-27 18:53:32 -07:00
Loïc Carr
523f650340
feat(postgres) Add support for std::time::Duration, time::Duration & chrono::Duration
2020-06-27 17:42:46 -07:00
Loïc Carr
71cb68b2f4
feat(postgres) Create bindings for PgInterval
2020-06-27 17:36:06 -07:00
Felipe Lessa
c827c72808
FixedOffset for SQLite + Local test.
2020-06-27 21:59:49 +01:00
Austin Bonander
e2dabeeeee
fix: use correct io:Error
constructor in net/socket.rs
2020-06-27 11:15:11 -07:00
Ryan Leckey
518eb0c41a
chore: add any to all-databases and to each db test in CI
2020-06-27 06:04:30 -07:00
Ryan Leckey
4bb88e7da2
chore: update dependencies
2020-06-27 05:57:21 -07:00
Marcus Griep
816ea65c39
fix(mysql): improve compatibility with ProxySQL
...
Joins the MySQL connection setup statements into a single statement to
prevent issues with ProxySQL, which requires special handling of
connections that might be shared between multiple backends.
Fixes #422
Signed-off-by: Marcus Griep <marcus@griep.us>
2020-06-27 05:55:34 -07:00
Ryan Leckey
4989327c97
fix: remove cfg flag on .capacity
2020-06-27 05:51:03 -07:00
Julius de Bruijn
2115d02cb0
Move pg-specific socket options to its options.
...
Makes tcp connections explicit.
2020-06-27 05:34:23 -07:00
Julius de Bruijn
71ebeb9cc3
Remove warnings on mssql for statement cache
2020-06-27 05:34:23 -07:00
Julius de Bruijn
bcc42644e6
Do not do compile-time checks on pg socket
2020-06-27 05:34:23 -07:00
Julius de Bruijn
0ccfab1f25
Decide host
parameter between host and socket
...
- If starts with a leading `/`, use socket
- If not, use host
2020-06-27 05:34:23 -07:00
Julius de Bruijn
868dc3dd5b
MySQL UDS Support
...
- Adds support for Unix Domain Sockets on MySQL
- Allows setting the socket path in PostgreSQL connection options
- ... and MySQL connection options
2020-06-27 05:34:23 -07:00
Felipe Lessa
30faf73208
Use DATETIME for Sqlite chrono, fix parsing and docs.
...
The name DATETIME is used as an example by the SQLite documentation
(https://sqlite.org/datatype3.html#affinity ).
2020-06-27 12:22:27 +01:00
Ryan Leckey
6235eb5a5e
fix: StatementCache::capacity is only used by sqlite
2020-06-27 04:09:58 -07:00
Felipe Lessa
f0adeae39e
Add sqlite chrono tests.
2020-06-27 12:08:16 +01:00
Felipe Lessa
516af07713
Sqlite support for DateTime<{Utc,Local}>.
2020-06-27 12:08:00 +01:00
Ryan Leckey
a7117dd71b
feat(any): introduce the Any database driver which enables choosing the database driver at runtime
2020-06-27 04:07:40 -07:00
Ryan Leckey
62d02e9450
feat: implement Execute for (&str, Arguments)
2020-06-27 04:06:54 -07:00
Ryan Leckey
5091a28ce6
refactor: remove Default requirement for ArgumentBuffer
2020-06-27 04:06:35 -07:00
Ryan Leckey
b7ec7bbd3e
refactor: allow non-Send adding to arguments crate-local
2020-06-27 04:06:22 -07:00
Ryan Leckey
eb26e9f557
refactor: remove several blanket impls to allow more customization
2020-06-27 04:05:23 -07:00
Ryan Leckey
34859af1d3
feat(core): lift Send bound for arguments to Arguments::add
...
Execute already required Send so this just makes it fail earlier
2020-06-27 04:03:17 -07:00
Felipe Lessa
4254735dcf
Update sqlite chrono support so it compiles.
2020-06-27 09:12:33 +01:00
Felipe Sere
333803c1ff
Correct table headings and only list types that are actually implemented
2020-06-27 08:25:07 +01:00
Felipe Sere
7c27065c09
First attempt at roundtripping chrono types through SQLite
2020-06-27 08:25:05 +01:00
Ryan Leckey
991c0ba155
fix(sqlite): double negative in sqlite connection prepare
2020-06-25 05:34:14 -07:00
Ryan Leckey
8d1368f163
fix(sqlite): with caching disabled force persistent to false
...
additionally, set persistent to true for a cached statement and
correctly only reset the statement when its being reused
2020-06-25 03:44:26 -07:00
Ryan Leckey
8d24dfc0ef
feat(cache): expose capacity on StatementCache
2020-06-25 03:43:31 -07:00
Julius de Bruijn
363dbfb81e
No need to reset the statement when dropping.
2020-06-25 12:38:20 +02:00
Julius de Bruijn
745a32ab60
Close pg statements correctly
2020-06-25 12:26:44 +02:00
Julius de Bruijn
f969798cb6
Document new connection string params
2020-06-25 11:57:55 +02:00
Julius de Bruijn
2c2a277666
Caching methods in Connection
2020-06-25 10:44:05 +02:00
Julius de Bruijn
eba82e3fc1
LRU caching for SQLite
2020-06-24 19:46:32 +02:00
Julius de Bruijn
5d64310004
LRU caching for PostgreSQL
2020-06-24 19:01:54 +02:00
Julius de Bruijn
2b6f242a22
LRU statement cache for MySQL
2020-06-24 16:57:06 +02:00
Tim Murison
72c4e040bc
Require a mutable reference to self
2020-06-23 17:03:48 -07:00
Tim Murison
cac3f193d7
Adds a method get the underlying sqlite3 pointer
2020-06-23 17:03:48 -07:00
Zachery Gyurkovitz
84e8ed0d4c
fix: bigdecimal decoding ob1 for positive weight multiples of 4
2020-06-23 13:10:03 -07:00
Ryan Leckey
f85920acaf
fix(postgres): ignore more harmless messages in execute
2020-06-21 22:09:00 -07:00
Ryan Leckey
3dc067f031
fix: downgrade num-bigint due to conflicting version in rsa
2020-06-21 04:13:45 -07:00
Ryan Leckey
ec6b4be7fb
fix: rename Decode::accepts to Type::compatible for MSSQL / bool
2020-06-21 04:13:33 -07:00
Ryan Leckey
4448c0e629
feat: add should_flush and only spawn on drop for PoolConnection if we need to flush
2020-06-21 03:55:31 -07:00
Ryan Leckey
d76002e110
postgres: ignore more messages during execution if they are deemed not relevant
2020-06-21 03:55:31 -07:00
Ryan Leckey
f8dc7284b9
chore: update dependencies
2020-06-21 03:55:31 -07:00
Ryan Leckey
e7e2f5b37a
fix: implement transparent Serialize and Deserialize for Json<_>
2020-06-21 03:55:31 -07:00
Ryan Leckey
93728a051c
fix: impl Deserialize for Json for MySQL instead of DeserializeOwned
2020-06-21 03:55:31 -07:00
Ryan Leckey
21717b47a0
fix: AsyncStream should use a zero-capacity stream to ensure we run in lock-step
2020-06-21 03:55:31 -07:00
Ryan Leckey
6cfe5ac811
refactor: tweak type name display to use TypeInfo::name
2020-06-21 03:55:31 -07:00
Ryan Leckey
aaa475cc33
refactor: move Decode::accepts to Type::compatible
2020-06-21 03:55:31 -07:00
Ryan Leckey
5ac7601fe2
docs: extend documentation on Encode/Decode
2020-06-21 03:55:31 -07:00
Ryan Leckey
11e21e201c
feat: add a name method to TypeInfo
2020-06-21 03:55:31 -07:00
Ryan Leckey
e3adb88ab5
feat: disassociate Type from Decode further and require only Decode for FromRow + Row + Value
2020-06-21 03:55:31 -07:00
Daniel Akhterov
80d545109b
feat: implement BIT
support in MSSQL
2020-06-15 22:49:33 -07:00
Bo Jeanes
956721c96c
Don't leak txns on explicit commit/rollback
...
Fixes #409
2020-06-14 20:03:50 -07:00
Ryan Leckey
e10c7c723f
refactor: remove impl of Encode::produces where it doesn't make sense
...
produces is meant as a value-dependent override, it only makes sense
currently for MSSQL or in generic contexts
2020-06-13 10:18:04 -07:00
Ryan Leckey
847e0b6b6b
fix(mysql): update usage of Digest and remove OAEP module in favor of the RSA crate
2020-06-13 08:55:24 -07:00
Ryan Leckey
c2ce35fc06
fix(postgres): update usage of Digest
2020-06-13 08:54:52 -07:00
Ryan Leckey
e2ac01e190
chore: update dependencies
2020-06-13 08:54:38 -07:00
Ryan Leckey
c9f3e1adca
feat(postgres): add support for built-in range types and allow derives to handle custom range types
...
Co-authored-by: Caio <c410.f3r@gmail.com>
2020-06-12 15:33:19 -07:00
Ryan Leckey
fedd883d91
style: rustfmt
2020-06-12 15:33:19 -07:00
Caio
d4329e98d4
refactor: prepare to support postgres ranges
...
- Remove Type bound from Encode + Decode which removes the defaults
for produces() and accepts(). This allows custom type implementations
to be more flexible.
2020-06-12 15:33:19 -07:00
Daniel Akhterov
98a0de2cfd
feat: implement Order
message type
2020-06-11 18:58:06 -07:00
Ryan Leckey
e9a562f89a
fix(mysql): handle MySQL sending more or less bytes than we expect for an integer type
2020-06-11 03:39:23 -07:00
Pirmin Kalberer
e5a7619344
Allow queries on virtual tables
2020-06-11 03:36:58 -07:00
Ryan Leckey
475ed9e1df
fix(mariadb): don't append UNSIGNED to the type of timestamp columns
2020-06-10 04:24:34 -07:00
Ryan Leckey
1dac0b5c29
fix(postgres): invert the type description logic to allow all "simple" type categories
...
closes #379
2020-06-10 04:21:09 -07:00
Ryan Leckey
e7d6e67f03
docs(pool): add some module docs to sqlx::pool
2020-06-10 01:51:14 -07:00
Ryan Leckey
ef6afb64d3
feat(pool): use Connect::Options over &str
2020-06-10 01:19:10 -07:00
Ryan Leckey
8359c01b76
fix(sqlite): set a busy timeout to handle SQLITE_BUSY
2020-06-10 01:02:41 -07:00
Ryan Leckey
a2c55b9f31
fix(mysql): tweak JSON type so it accepts BINARY in addition to CHAR (and make tests pass in MySQL 5.5)
2020-06-10 00:43:14 -07:00
Ryan Leckey
6fcb520ac9
fix(mssql): emit nvarchar(max) if len is too large
2020-06-10 00:43:14 -07:00
Ryan Leckey
72ca9036c5
fix(mssql): potential stall on re-using connection after an dropped incomplete fetch stream
2020-06-10 00:43:14 -07:00
Peter Maatman
2a5ea2f71b
mysql: always use column alias when available
...
If a query has a column alias available we should use that name instead
of the column name.
Fixes #385
2020-06-10 00:42:58 -07:00
Ryan Leckey
ec1cfc11e6
refactor(core): rename try_stream2 to try_stream (after removal of conflicting async-stream package)
2020-06-09 23:15:54 -07:00
Ryan Leckey
65057f0e05
fix(core): add missing .await
in try_stream!
2020-06-09 23:15:19 -07:00
Ryan Leckey
e1d22a1840
fix(core): async-stream crate seems to lose the stream if the stream owns the object we are streaming
...
hand-rolled a copy of the idea behind AsyncStream and things seem to work
2020-06-09 02:16:47 -07:00
Ryan Leckey
e54d030381
fix(mysql): str should produce VARCHAR not BLOB
2020-06-08 02:30:21 -07:00
Ryan Leckey
9a7401a427
chore: update dependencies
2020-06-07 16:30:21 -07:00
Ryan Leckey
f2885f84a7
fix(mssql): handle NULL values
2020-06-07 16:30:07 -07:00
Ryan Leckey
a0ccc135aa
style(mssql): rename MsSql to Mssql as MSSQL is not written MsSQL
2020-06-07 05:39:12 -07:00
Ryan Leckey
c9eef8b030
fix(postgres): failure to detect errors on postgres 9.5
2020-06-07 05:09:51 -07:00
Ryan Leckey
53c074130f
Merge remote-tracking branch 'origin/ab/macro-fixes'
2020-06-07 02:35:12 -07:00
Daniel Akhterov
c050611bac
fix: remove DatebaseError impl for stringprep::Error and panic instead
2020-06-07 02:34:41 -07:00
Daniel Akhterov
362a546484
feat(postgres): make sure username is ran through saslprep before sending to server
2020-06-07 02:34:41 -07:00
流光
ebfd5eb4f8
fix bug in init_min_connections
2020-06-07 02:34:20 -07:00
Ryan Leckey
9233cb5812
fix(sqlite): minor typo when encode for Option<T> became a macro
2020-06-07 02:15:48 -07:00
Ryan Leckey
13598c0eeb
feat(mssql): add support for offline
2020-06-07 02:15:10 -07:00
Ryan Leckey
ef2527ff3e
feat(mssql): fix a few bugs and implement Connection::describe
2020-06-07 02:00:31 -07:00
Ryan Leckey
559169cc79
refactor(mssql): clean up unused imports and other warnings
2020-06-07 02:00:13 -07:00
Ryan Leckey
12c1137d91
feat(mssql): add support for f32 and f64
2020-06-07 02:00:13 -07:00
Ryan Leckey
28636c1f5d
feat(mssql): add support for string types including a framework for handling non-UTF8 data
2020-06-07 02:00:13 -07:00
Ryan Leckey
2a272bdd59
feat(mssql): setup type tests for MSSQL and add support for all the int types
2020-06-07 02:00:13 -07:00
Ryan Leckey
434bfaa76a
feat(mssql): handle stream flushing
2020-06-07 02:00:13 -07:00
Ryan Leckey
c64122c03f
feat(mssql): implement parameterized queries
2020-06-07 02:00:13 -07:00
Ryan Leckey
9a701313bc
feat(mssql): implement enough to get simple queries working
...
Co-authored-by: Daniel Akhterov <akhterovd@gmail.com>
2020-06-07 02:00:12 -07:00
Ryan Leckey
05eb07e7d4
feat(mssql): setup the initial boilerplate for MSSQL
...
Co-authored-by: Daniel Akhterov <akhterovd@gmail.com>
2020-06-07 02:00:12 -07:00
Ryan Leckey
3bc11cea26
fix: comment in mysql should say mysql
2020-06-07 02:00:12 -07:00
Daniel Akhterov
2863247660
fix: remove mssql and db2 modules
2020-06-06 11:01:40 -07:00
Daniel Akhterov
1b9ef2b7f2
fix: comment out mssql module
2020-06-06 10:59:44 -07:00
Austin Bonander
80b4e2fca6
fix(macros): reintroduce and fix macro tests for MySQL
2020-06-05 21:02:24 -07:00
Austin Bonander
e3dbd58bf2
PgConnection: use more obvious/safer query for ping()
2020-06-05 20:13:20 -07:00
rage311
a0d1106f90
Added quotes to listen/unlisten channel names to honor case sensitivity and be consistent with 'listen_all()'
2020-06-05 19:50:44 -07:00
dignifiedquire
9b68eb19ef
fix(sqlx-macros): update trait definitions
2020-06-05 19:49:31 -07:00
Ryan Leckey
9341cb8651
test: mark macro doctests as ignored (for now)
2020-06-01 17:06:42 -07:00
Ryan Leckey
b7f8a5fa81
fix: remove outdated comment, we do have the test_on_acquire setting
2020-06-01 05:37:26 -07:00
Ryan Leckey
bb7c064bec
fix: error handling in main options examples
2020-06-01 05:35:13 -07:00
Ryan Leckey
a3053119fa
fix: expose runtime-actix in sqlx/Cargo.toml
2020-06-01 05:34:52 -07:00
dignifiedquire
994911b1fe
feat: implement FromRow for tuples up to 16
2020-05-31 00:08:33 -07:00
Ryan Leckey
51ae9f00e7
chore: bump version to 0.4.0-pre
2020-05-30 23:15:52 -07:00
Ryan Leckey
3fcd4cd80e
style(core): apply more clippy suggestions
2020-05-30 18:28:55 -07:00
Ryan Leckey
35bf560481
fix(core): tweak serialization impls to fix offline mode
2020-05-30 18:17:51 -07:00
Ryan Leckey
9b299d9f09
style(core): apply future-incompatible suggestions
2020-05-30 18:06:21 -07:00
Ryan Leckey
72c1f52caf
style(core): apply clippy suggestions
2020-05-30 18:00:21 -07:00
Ryan Leckey
e08f05b879
feat: re-introduce error downcasting
2020-05-30 17:51:56 -07:00
Ryan Leckey
e5b6047009
feat: introduce docker-compose based testing for running locally against many database combinations
2020-05-30 17:51:55 -07:00
Ryan Leckey
afd831b0d3
feat: re-introduce Pool::begin and add Pool::try_begin to match Pool::try_acquire
2020-05-30 17:51:55 -07:00
Ryan Leckey
0a04abdb3e
feat: Pool is now generic over Database, as opposed to Connection
...
this fixes an unfortunate interaction with HRTBs where the compiler would
produce infinitely nested PoolConnection<PoolConnection<....
2020-05-30 17:51:55 -07:00
Ryan Leckey
cf7606be1b
fix: Transaction now to rollbacks on drop (again)
2020-05-30 17:51:55 -07:00
Ryan Leckey
bb3b571a57
fix: tweak lifetimes in Executor to limit the scope for the borrow on the query to the single execution
2020-05-30 17:51:55 -07:00
Ryan Leckey
cc9d443434
feat: re-introduce Transaction
...
* Transaction now wraps `&mut Connection` instead of `Connection`
2020-05-30 17:51:55 -07:00
Ryan Leckey
9d2a0141cb
feat: introduce IntoArguments, query_with, query_as_with, and query_scalar_with
2020-05-30 17:51:55 -07:00
Ryan Leckey
88532ffc28
refactor: clean up warnings
2020-05-30 17:51:49 -07:00
Ryan Leckey
a54b1267f6
refactor(macros): adapt to the 0.4.x core refactor
2020-05-30 17:51:49 -07:00
Ryan Leckey
eaa7fba9d4
refactor(postgres): adapt to the 0.4.x core refactor
2020-05-30 17:49:30 -07:00
Ryan Leckey
2966b655fc
refactor(mysql): adapt to the 0.4.x core refactor
2020-05-30 17:48:10 -07:00
Ryan Leckey
37a69e0ac3
refactor(sqlite): adapt to the 0.4.x core refactor
...
* massive (~20x) performance improvement
2020-05-30 16:09:50 -07:00
Ryan Leckey
757a930e21
refactor(core): remove the HRTB (higher rank trait bound) on Row in the aim of improving ergonomics
...
* removes the lifetime from Row
* removes MySqlQueryAs, SqliteQueryAs, etc. (no longer needed)
* introduce query_scalar
* introduce Decode::accepts to allow overriding runtime type checking
per-type (replaces TypeInfo::compatible)
* introduce Encode::produces to allow overriding the encoded type per-value
* adds a lifetime to Arguments (and introduce the HRTB HasArguments)
to support zero-copy encoding with SQLite
* renames Database::RawBuffer to HasArguments::ArgumentBuffer
* introduce Connect::connect_with to provide an ConnectOptions type
explicitly to opt-out of connection string parsing
* introduce Value and ValueRef traits to allow decoding-deferred
extraction of values from Rows
* introduce Encode::encode_by_ref and change Encode::encode to take
by-value to try and re-use memory where possible
* use thiserror to generate sqlx::Error
* [!] temporarily removes query logging
* [!] temporarily removes transactions
2020-05-30 16:09:08 -07:00
Austin Bonander
6913695588
add support for building in "decoupled" mode
2020-05-30 16:02:37 -07:00
吴翱翔
77cdafe08a
Fix a misspelling in MySQL types document
2020-05-15 12:46:35 -07:00
Ryan Leckey
cbccd68963
chore: prepare v0.3.5
2020-05-06 03:30:35 -07:00
meh
7b1cc7fd09
Derive Serialize and Deserialize for Json
2020-05-06 00:13:19 -07:00
Austin Bonander
c285e28670
fix and test handling of 0 for BigDecimal in Postgres/MySQL
...
closes #283
2020-04-28 11:54:41 -07:00
Peter Maatman
4122a3dbd9
mysql: Advance buffer to comply with protocol
...
Fixes #254
2020-04-27 16:47:38 -07:00
Hasan Ali
3e2ed00b60
Drop all statements before closing sqlite connection
2020-04-27 10:20:57 -07:00
Josh Holmer
581bcf0ceb
Extract slow query threshold to constant
2020-04-23 14:09:59 -07:00
Josh Holmer
627d8292f8
Log queries from sqlx::query
...
This will make logged queries show
as from `sqlx::query` instead of `sqlx::db_name::executor`.
Followup to #268
2020-04-23 14:09:59 -07:00
Josh Holmer
f73149a90f
Format SQL queries when printing them to the logs
...
Before, the query would be formatted equivalent to the input string:
```
[2020-04-18T23:47:32Z DEBUG sqlx_core::postgres::executor] SELECT id, queue, ..., elapsed: 2.320µs
SELECT id, queue, payload, status, priority, created_at, updated_at
FROM jobs
WHERE status = $1
ORDER BY priority ASC, created_at ASC
```
After, the query is formatted cleanly and consistently:
```
[2020-04-19T00:30:18Z DEBUG sqlx_core::postgres::executor] SELECT id, queue, ..., elapsed: 2.280µs
SELECT
id,
queue,
payload,
status,
priority,
created_at,
updated_at
FROM
jobs
WHERE
status = $1
ORDER BY
priority ASC,
created_at ASC
```
This uses the `sqlformat` crate, which was ported from the
Javascript `sql-formatter-plus` library specifically for this purpose.
2020-04-19 16:11:50 -07:00
Ryan Leckey
1cdfb8507c
fix: remove the clone
on Encode for JsonValue
2020-04-19 16:05:37 -07:00
Peter Maatman
1b04829c46
json: Refactor Encode/Decode for serde values to be generic for DB
...
Since the implementation of Encode and Decode for both mysql and
postgres on serde's Value and RawValue were practically the same they
were moved to the generic json module.
2020-04-19 15:58:47 -07:00
Peter Maatman
30d13174ea
mysql: Add JSON support
2020-04-19 15:58:47 -07:00
Felix Wiedemann
57f52ffbc4
postgres: Use $USER as default for the username
2020-04-18 14:31:31 -07:00
Felix Wiedemann
f3fe41ebdb
postgres: Use username as default for database name
2020-04-18 14:31:31 -07:00
Felix Wiedemann
a2673f7880
postgres: Add support for postgres:///?host=...
connection strings
2020-04-18 14:31:31 -07:00
Felix Wiedemann
fc78f15ebf
postgres: Add support for non-default socket paths
2020-04-18 14:31:31 -07:00
Felix Wiedemann
5628658d3f
postgres: Add unix domain socket support
2020-04-18 14:31:31 -07:00
Felix Wiedemann
49f15713d6
Move empty host handling to the DB specific code
2020-04-18 14:31:31 -07:00
Josh Holmer
16229fd0ad
Add basic query logging
...
Prints each query performed at DEBUG level,
along with a timing of how long the query took
to execute.
Slow queries will be printed at WARN level.
Currently the slow query threshold is
hardcoded to 1 second.
2020-04-17 22:49:33 -07:00
George Kaplan
7df6d4dbcf
undo URL percent-encoding for SQLite connection strings
2020-04-17 18:23:33 -07:00
meh
2fb38dd0c1
Derive all traits and impl Deref and AsRef for types::Json
2020-04-16 11:00:31 -07:00
Austin Bonander
80eb2cc7d2
make the stream returned from Map::fetch()
Unpin
...
closes #244
2020-04-11 03:04:21 -07:00
Ryan Leckey
90fd35745c
Prepare v0.3.4
2020-04-10 15:56:13 -07:00
xiaopengli89
5711e1cc94
refactor: mysql decimal value is just ascii str
2020-04-10 15:35:58 -07:00
xiaopengli89
229635771a
fix: test
2020-04-10 15:35:58 -07:00
xiaopengli89
771d423c6f
fix: change u8::MAX to std::u8::MAX
2020-04-10 15:35:58 -07:00
xiaopengli89
401ffd19e6
add test_encode_decimal, test_decode_decimal
2020-04-10 15:35:58 -07:00
xiaopengli89
b354ed430d
implement DECIMAL
type support for mysql
2020-04-10 15:35:58 -07:00
Ryan Leckey
d360f682f8
fix(postgres): guarantee the type name on a PgTypeInfo to always be set
...
fixes #241
2020-04-10 13:37:08 -07:00
Ryan Leckey
cd6735b5d7
fix(sqlite): handle empty statements, fixes #231
2020-04-08 02:13:37 -07:00
Ryan Leckey
72bd933e41
add MapRow impls; closes #228
2020-04-08 01:24:57 -07:00
Kristy Brambila
0e61642165
Make postgres type name resolution case-insensitive
2020-04-08 01:22:37 -07:00
kosyak
6c9241a3a9
Fixed types of variables that interact with libsqlite3
2020-04-07 04:10:47 -07:00
Ryan Leckey
e7ace2adc7
Prepare v0.3.3
2020-04-01 18:24:08 -07:00
Ryan Leckey
2a9774d84f
use cow::borrowed to remove a minor allocation in postgres/startup
...
refs #214
2020-03-31 21:41:29 -07:00
Ryan Leckey
3a997f06ab
Merge pull request #214 from jamwaffles/encoded-connection-string
...
Decode username on read
2020-03-31 21:38:33 -07:00
James Waples
f05f6bedd9
Decode username on read
2020-03-31 23:03:17 +01:00
Ryan Leckey
283f0ef6d8
Merge pull request #216 from Ace4896/must-use-types
...
Mark several types as #[must_use]
2020-03-31 11:49:05 -07:00
Jon Pacheco
ccc2bfa0a6
Mark several types as #[must_use]
2020-03-31 14:39:29 +01:00
Neeraj Jaiswal
c29fc5cccd
Remove matches dependency and use matches macro from std
2020-03-31 18:01:06 +05:30
Ryan Leckey
a9fc05378e
Prepare v0.3.2
2020-03-31 03:02:01 -07:00
Ryan Leckey
371e843bb2
mysql: remove random println
2020-03-31 03:00:31 -07:00
Ryan Leckey
a84e1f6626
Prepare v0.3.1
2020-03-30 18:53:03 -07:00
Ryan Leckey
b65602d842
postgres: remove unused import
2020-03-30 18:52:52 -07:00
Ryan Leckey
d820763bb9
mysql: infer empty password to mean no password
2020-03-30 18:42:25 -07:00
Ryan Leckey
d3eb9c7800
postgres: use PgStream::receive over PgStream::read to handle errors
...
* PgStream::read should probably be named better; maybe PgStream::raw_receive
Fixes #203
2020-03-30 18:38:31 -07:00
Ryan Leckey
bbbc1811ce
postgres: tweak DataRow::read
2020-03-30 18:31:05 -07:00
Ryan Leckey
670265f103
docs: fix link to db types
2020-03-29 16:34:05 -07:00
Ryan Leckey
fc3d06bf9b
Prepare v0.3.0
2020-03-29 16:27:41 -07:00
Ryan Leckey
6de52567d7
docs: fix link to db types
2020-03-29 16:00:51 -07:00
Ryan Leckey
4ec9e9fce2
mysql: remove MySqlTypeInfo from mysql::types
2020-03-29 16:00:02 -07:00
Ryan Leckey
4b9a615b32
sqlite: remove SqliteTypeInfo from sqlite::types
2020-03-29 15:57:59 -07:00
Ryan Leckey
b8537d0a87
sqlite: condense allow(unsafe_code)
2020-03-29 15:55:09 -07:00
Ryan Leckey
2b06386bf1
sqlite: remove two unused imports
2020-03-29 15:53:04 -07:00
Ryan Leckey
b6d87a4cc7
require Rows to be Sync
2020-03-29 15:52:49 -07:00
Austin Bonander
73a9155b46
fix import of from_utf8_unchecked()
2020-03-28 17:50:27 -07:00
Austin Bonander
4ffa7f0e01
SQLite: implement column nullability checking
2020-03-28 17:50:27 -07:00
Austin Bonander
fe00c0d619
sqlite/statement.rs: lift #[allow(unsafe_code)]
to module
2020-03-28 17:50:27 -07:00
Austin Bonander
6fde5a2579
implement nullability on macro output, test postgres
2020-03-28 17:50:27 -07:00
Oliver Bøving
bcb3959379
Add array of uuid, chrono, time, bigdecimal, and ipnetwork as well as JsonValue to query macro ( #154 )
...
* Add array of uuid, chrono, time, bigdecimal, and ipnetwork to query macro
* Comment out tests for arrays of BigDecimal
Currently arrays of BigDecimal doesn't in query macros compile.
As all of the other types work just fine, BigDecimal is simply omitted.
* Add serde_json::Value to query macros
This also adds serde_json as an optional dependency to sqlx_macros along
side a new json feature flag.
2020-03-28 17:28:47 -07:00
Ryan Leckey
dddaefec41
postgres: capitalize the W in handling the WHERE field for notice
...
Fixes #120
2020-03-27 16:43:15 -07:00
Ryan Leckey
a2d82d0ac1
Add Row::get_unchecked and Row::try_get_unchecked
2020-03-27 16:11:28 -07:00
Austin Bonander
e594a7fdca
Postgres: don't cache failed statement
2020-03-27 15:54:28 -07:00
Ryan Leckey
3103d50be8
postgres: implement PgTypeInfo::with_name
...
- remove PgTypeInfo::with_oid
- use a new PgRawBuffer type instead of Vec<u8> for encoding
2020-03-26 19:29:49 -07:00
Ryan Leckey
2409c2b042
postgres: indicate that we do not support CITEXT right now
2020-03-26 19:16:54 -07:00
Austin Bonander
e99a863288
remove now-unused imports and reformat
2020-03-25 21:37:11 -07:00
Austin Bonander
6e3fa49ad5
add unit tests for DatabaseError
downcasting
2020-03-25 18:26:57 -07:00
Austin Bonander
673f133cab
un-generify Error
and support downcasting in DatabaseError
2020-03-25 18:13:56 -07:00
Ryan Leckey
a90ff10a27
Prepare v0.3.0-alpha.2
2020-03-25 04:58:22 -07:00
Ryan Leckey
41608c3f60
rename {DB}Error -> {DB}DatabaseError
2020-03-25 04:50:27 -07:00
Ryan Leckey
2274b69556
postgres: support "CHAR" and OID
2020-03-25 04:46:17 -07:00
Ryan Leckey
6049f976f9
opt out of compatible type check for null values
2020-03-25 04:25:38 -07:00
Ryan Leckey
7ab772ea80
postgres: simplify JSON support to just Json<T>
2020-03-25 04:20:35 -07:00
Ryan Leckey
8454fa4e96
fix tests and ensure all types are being tested in CI
2020-03-25 04:06:14 -07:00
Ryan Leckey
2f6bab396a
Add PartialEq for PgTypeInfo and SqliteTypeInfo
2020-03-25 03:59:29 -07:00
Ryan Leckey
ad2cf1676f
mysql: tweak type equivalence rules to try and support both rust best practices but still be compatible with the loose types of mysql
2020-03-25 03:56:39 -07:00
Ryan Leckey
50928b06b8
mysql: implement type compatible checks
2020-03-25 03:24:43 -07:00
Ryan Leckey
985d62009c
sqlite: adjust for recent changes with RawValue
2020-03-25 02:37:10 -07:00
Ryan Leckey
fbd1a0435f
postgres: support NAME and UNKNOWN types (compatible to TEXT)
2020-03-25 02:28:30 -07:00
Ryan Leckey
6ebd5c8c1e
postgres: test type compatibility for record fields
2020-03-25 02:28:10 -07:00
Ryan Leckey
129efcd367
implement a runtime type compatibility check before decoding values
2020-03-25 02:07:17 -07:00
Ryan Leckey
1dc582edd0
postgres: have PgValue remember its type OID
...
this is in preparation of doing type compatibility checks
2020-03-25 01:46:13 -07:00
Ryan Leckey
918a797581
move HasX types into the module where X is
2020-03-25 01:44:00 -07:00
Ryan Leckey
63aa3e8f0f
add support for VARCHAR and BPCHAR in postgres
2020-03-24 12:49:52 -07:00
Ryan Leckey
dcea3f0586
fix FromRow derive to take &Row
2020-03-24 03:08:58 -07:00
Ryan Leckey
aa1cb24de9
remove DecodeOwned
2020-03-24 03:03:04 -07:00
Ryan Leckey
fa4138b25c
add docs to explain the SQL <-> Rust mapping
2020-03-24 02:56:52 -07:00
Ryan Leckey
43a72657f9
add a hack so bigdecimal can be the package name and the feature name
2020-03-24 02:56:14 -07:00
Ryan Leckey
f2ca42256b
Add more documentation for Connection and Transaction
2020-03-24 02:12:42 -07:00
Ryan Leckey
412f7125fb
document Cursor
2020-03-24 01:53:56 -07:00
Ryan Leckey
1940b685d3
fix warnings from rustdoc
2020-03-24 01:36:17 -07:00
Ryan Leckey
792acdd554
audit Row, FromRow, and ColumnIndex
...
* tweak FromRow to accept Row by reference, should make it easier to compose FromRow impls
* rename ColumnIndex::resolve to ColumnIndex::index
* document behaviors
2020-03-24 01:24:10 -07:00
Ryan Leckey
0182ce92f2
make sqlx_core::runtime private and add a runtime module to sqlx-macros
2020-03-24 01:19:03 -07:00
Ryan Leckey
ba86bc5555
Tweak doc on Cursor::next
2020-03-23 21:22:09 -07:00
Ryan Leckey
a0bf61cc4a
Declare ColumnIndex over Row instead of over Database
2020-03-23 21:21:59 -07:00
Ryan Leckey
cb2e3220e0
simplify lifetimes on Row
2020-03-21 03:25:17 -07:00
Ryan Leckey
200d534b8a
Fix time/chrono decode tests
2020-03-21 03:01:23 -07:00
Ryan Leckey
0ef1ef3c4f
time: we need std feature
2020-03-21 02:42:32 -07:00
Ryan Leckey
db543f8391
clean up Time impl, impl for text modes
2020-03-21 02:34:21 -07:00
Ryan Leckey
4a98a51a19
Merge remote-tracking branch 'utter-step/time-rs'
2020-03-21 01:25:00 -07:00
Ryan Leckey
05d8ac2747
Finish up JSON/JSONB support for Postgres
...
* implement for &serde_json::RawValue
* sqlx::types::Json<T> is a common type that all JSON-compatible databases can implement for,
postgres implements Json<T> as JSONB
* sqlx::postgres::types::PgJson<T> resolves to JSON
* sqlx::postgres::types::PgJsonB<T> resolves to JSONB
2020-03-21 01:16:34 -07:00
Oliver Bøving
b7e53e885a
First draft of JSON/JSONB support for postgres
...
This introduces two new wrapper types `Json` and `Jsonb`, currently
exported by `sqlx::postgres::{Json, Jsonb}` and adds serde and
serde_json as optional dependencies, under the feature flag `json`.
Wrapping types in `Json[b]` that implement `serde::Deserialize` and
`serde::Serialize` allows them to be decoded and encoded respectivly.
2020-03-20 23:59:25 -07:00
Daniel Akhterov
cbdc1bbfb2
Refactor the error to be generic over database
2020-03-20 23:51:45 -07:00
Ryan Leckey
f86f80d8b9
mysql: ping now follows the normal stream lifecycle
...
fixes test introduced by #142
Co-authored-by: Daniel Akhterov <daniel@launchbadge.com>
2020-03-20 20:47:30 -07:00
Ryan Leckey
ec27b65b26
postgres: change types in macros
...
Co-authored-by: Oliver Bøving <oliverboving@gmail.com>
2020-03-20 20:07:52 -07:00
Ryan Leckey
e42a995fd9
Extract a PgSequenceDecoder from ArrayDecoder and RecordDecoder and improve to support mutual nesting
2020-03-20 19:56:25 -07:00
Ryan Leckey
13997ce957
Change HasSqlType to Type
2020-03-20 19:55:47 -07:00
Ryan Leckey
9973fa6357
Add decode_err! to help with formatted decode error generation
2020-03-20 19:55:00 -07:00
Ryan Leckey
24d62dd464
Add DecodeOwned to help with trait bounds on owned data
2020-03-20 19:54:44 -07:00
Ryan Leckey
f562e919b7
Merge branch '1d-array-pg-support' of https://github.com/oeb25/sqlx into oeb25-1d-array-pg-support
2020-03-20 10:11:02 -07:00
Ryan Leckey
50c3e5fefb
Merge pull request #138 from PoiScript/master
...
postgres: ipnetwork support
2020-03-20 09:54:43 -07:00
Ryan Leckey
a017150890
postgres: tls: accept invalid certificates and mismatched hostnames under "prefer"
2020-03-20 09:47:18 -07:00
PoiScript
fbbae16a74
update decoding and encoding
2020-03-20 11:10:36 +08:00
PoiScript
3014ab4750
fix typo in Cargo.toml
2020-03-20 10:51:47 +08:00
PoiScript
7ab76ba84e
make inet and cidr compatible
2020-03-20 10:19:14 +08:00
PoiScript
c9cca27e65
rename feature gate to ipnetwork
2020-03-20 10:19:14 +08:00
PoiScript
060c5d2b66
postgres: ipnetwork support
2020-03-19 18:21:09 +08:00
Ryan Leckey
9be1512833
mysql: use double literals in test
2020-03-18 23:16:56 -07:00
Ryan Leckey
2a8906d1e5
add more documentation
2020-03-18 22:46:44 -07:00
Ryan Leckey
1fc18460b0
transaction: document, test, and fix operation of nested transactions
2020-03-18 22:46:44 -07:00
Ryan Leckey
829f37793a
Re-export PgRecordEncoder and PgRecordDecoder
2020-03-18 22:11:02 -07:00
Ryan Leckey
5809f8687c
Merge remote-tracking branch 'origin/ab/bigdecimal'
2020-03-18 22:09:27 -07:00
Ryan Leckey
dfb313f0c6
Add Postgres <-> Rust type documentation
2020-03-18 22:08:32 -07:00
Ryan Leckey
cb67ed0300
Make PgTypeInfo::oid doc(hidden)
2020-03-18 22:08:18 -07:00
Austin Bonander
33677e86a8
move PgNumeric[Sign], PgRecord[Encoder,Decoder] to hidden postgres::types::raw
...
fix errors
2020-03-18 19:36:54 -07:00
Austin Bonander
7ffec2fef8
remove .expect()
in impl TryFrom<PgNumeric> for BigDecimal
2020-03-18 19:12:14 -07:00
Austin Bonander
979c5cc944
remove unnecessary comment and update Cargo.lock
2020-03-18 19:09:10 -07:00
Austin Bonander
3a43e939e3
refactor PgNumeric
so NaN can't be misinterpreted, document types
2020-03-18 19:06:14 -07:00
Austin Bonander
b7aabaa0ec
numeric/bigdecimal modules: fix warnings
2020-03-18 19:06:14 -07:00
Austin Bonander
3cb42def3b
macros: add support for Postgres + BigDecimal
2020-03-18 19:06:14 -07:00
Austin Bonander
94c40b3eb7
Postgres: implement numeric and BigDecimal support
2020-03-18 19:06:14 -07:00
Ryan Leckey
06be59f7f0
Remove MaybeOwned
2020-03-18 17:08:44 -07:00
Ryan Leckey
d1af2fe1b0
Prepare v0.3.0-alpha.1
2020-03-18 16:58:42 -07:00
Ryan Leckey
9d9d2bbfd4
Update dependencies
2020-03-18 16:56:24 -07:00
Ryan Leckey
6f4c478fb7
sqlite: fix NULL handling
2020-03-18 16:52:27 -07:00
Ryan Leckey
2f78ce094c
mysql: use correct default port
2020-03-17 22:02:01 -07:00
Ryan Leckey
d380f4b4a8
remove is_null_type and use Option<TypeInfo>
2020-03-17 21:43:41 -07:00
Ryan Leckey
927e2b1586
describe: fix Debug of Column
2020-03-17 21:34:12 -07:00
Ryan Leckey
b04f2cbd4d
sqlite: fix detection of INT and CHAR types
2020-03-17 21:34:01 -07:00
Austin Bonander
6cea7e2c1b
macros: add proper test for sqlite using database file
2020-03-17 21:10:19 -07:00
Austin Bonander
8328e07c97
macros + sqlite: fix error for null-typed columns
2020-03-17 21:10:19 -07:00
Ryan Leckey
2a76123bc3
Merge pull request #134 from launchbadge/derives
...
Add derives to support custom types
2020-03-17 20:04:19 -07:00
Ryan Leckey
21059620dc
mysql: support understanding ENUM as TEXT
2020-03-17 19:26:31 -07:00
Ryan Leckey
c1e6b2045c
postgres: support null in a record
2020-03-17 19:26:15 -07:00
Brian Misiak
459828ee3d
postgres: remove IntervalStyle to fix #130
...
Support more server versions, including CockroachDB, which only supports the `postgres` style.
2020-03-17 17:55:27 -07:00
Ryan Leckey
100602187f
memo: add more documentation to the database module
2020-03-17 16:33:44 -07:00
Ryan Leckey
602e61ab27
postgres: add support for decoding anonymous tuples and more fully test encoding/decoding records
2020-03-17 02:47:37 -07:00
Ryan Leckey
4e7b1b51e0
sqlite: handle encoding nulls
2020-03-17 01:13:32 -07:00
Ryan Leckey
a5d17eab00
add derive(Debug) for PgValue
2020-03-17 01:13:15 -07:00
Ryan Leckey
ced6713f57
add trailing newline
2020-03-17 01:11:15 -07:00
Tom Dohrmann
8841f83e68
removed unused imports
2020-03-16 22:58:31 -07:00
Tom Dohrmann
4cd179d42b
move decode_struct_field and encode_struct_field to sqlx-core
2020-03-16 22:58:31 -07:00
Tom Dohrmann
c3aeb275c2
add derive macros for weak & strong enums and structs
2020-03-16 22:58:25 -07:00
Ryan Leckey
ada57fa566
postgres depends on Sink from futures
2020-03-16 22:55:25 -07:00
Ryan Leckey
e0ca521889
cursor: for now, add #[doc(hidden)] to from_connection and from_pool as we look for ways to remove them
2020-03-16 22:51:55 -07:00
Ryan Leckey
d8f3953d9d
depend on std feature in futures-channel
2020-03-16 20:32:36 -07:00
Ryan Leckey
4869f48f84
sqlite: don't leak on connection failure
2020-03-16 20:30:28 -07:00
Ryan Leckey
48714e8ea9
Remove unused import in postgres/listen.rs
2020-03-16 20:00:36 -07:00
Ryan Leckey
0e3eb7ce39
postgres: listen: go back to Vec<String> for channels
2020-03-16 19:54:38 -07:00
Ryan Leckey
57d414f15c
sqlite: fix impl of DatabaseError
2020-03-16 19:54:24 -07:00
Ryan Leckey
e99e80cf94
listen: merge PgListener and PgPoolListener; allow PgListener to be used as an Executor; allow channels to be adjusted at run-time
2020-03-16 18:35:37 -07:00
Ryan Leckey
ed9d6c3b62
pool: handle reconnects during "boot"
2020-03-16 18:34:09 -07:00
Ryan Leckey
f677748a3b
postgres: Add lifetime to NotificationResponse
2020-03-16 18:31:09 -07:00
Ryan Leckey
b80080a95b
postgres: Stream::read -> Stream::receive and extract "just reading" to Stream::read
2020-03-16 18:30:45 -07:00
Ryan Leckey
0ecacfaf1d
io: forward lifetime properly in Buf trait
2020-03-16 18:29:54 -07:00
Ryan Leckey
1d0100b35d
Add DatabaseError::code
2020-03-16 18:29:41 -07:00
Ryan Leckey
5cb0d9d9cc
connection: remove unused import for MaybeOwned
2020-03-16 18:27:22 -07:00
Ryan Leckey
12e250b52c
Inline MaybeOwned in ConnectionSource and add another variant to store owned or ref connections
2020-03-15 02:58:41 -07:00
Ryan Leckey
4419aea619
update postgres/listen.rs for internal changes
2020-03-15 02:17:14 -07:00
Anthony Dodd
3db54dd724
Remove the Drop impl for PgPoolListener.
...
This is being removed as it was causing undesired behavior under some
contexts.
2020-03-15 02:17:14 -07:00
Anthony Dodd
82923a1aaa
Update stream impls.
...
The basic PgListener stream impl now yields `Result<PgNotification>`
elements without an `Option` in the result. The option condition
originally represented the closure of the underlying connection. Now
such conditions will terminate the stream, as one would expect. The
`PgListener.recv()` method signature has not been changed.
PgPoolListener has also been updated. The interfaces on this struct will
never yield an inner `Option` as it will instead acquire a new
connection and continue its work. Both the stream impl & the `recv`
method have received an update to their signatures.
2020-03-15 02:17:14 -07:00
Anthony Dodd
608556f91a
Impl Drop for PgPoolListener & add to exports.
2020-03-15 02:17:14 -07:00
Anthony Dodd
ae7e15cbe3
Added demo program to show use of LISTEN/NOTIFY.
2020-03-15 02:17:14 -07:00
Anthony Dodd
a0da99e128
A good bit of refactoring.
...
Broke up PgListener into two types. PgListener for basic one-off
connections, and PgPoolListener for the listener created from the
PgPool.
The API is a bit more clear now with this change in terms of reconnect
behavior and the like.
Update `fn stream` to be `fn into_stream`, as that nomenclature is a bit
more normative in the Rust ecosystem.
2020-03-15 02:17:14 -07:00
Anthony Dodd
f83180861b
Impl a few features & refactor some code based on design discussion.
...
Extension traits are now being used for PgConnection, PgPoolConnection &
PgPool for listen/notify functionality. Only two extension traits were
introduced.
Only a single trait method is present on the extension traits and it
works for single or multi channel listening setups.
Automatic reconnect behavior is implemented for PgPool based listeners.
All logic has been cut over to the `recv` impls for the PgListener
variants.
Use async-stream for a nice Stream interface.
2020-03-15 02:17:14 -07:00
Anthony Dodd
cb186e6a13
Updates from review and from testing.
2020-03-15 02:17:14 -07:00
Anthony Dodd
a52f36468b
Implement Postgres LISTEN interface.
...
This changeset introduces an interface for using PostgreSQL's LISTEN
functionality from within sqlx.
The listen interface is implemented over the PgConnection, PgPool & the
PgPoolConnection types for ease of use. In the case of PgPool, a new
connection is acquired, and is then used for LISTEN functionality.
Closes #87
2020-03-15 02:17:14 -07:00
Ryan Leckey
ab20db14a2
Remove Sqlite prefix from SqliteStatement as it is an internal API
2020-03-15 02:16:31 -07:00
Ryan Leckey
68d4a0d258
sqlite: produce connection specific errors
...
postgres, mysql: use derive for Debug for error types
2020-03-15 02:14:23 -07:00
Ryan Leckey
f667910cbf
sqlite: SqliteResultValue -> SqliteValue to match other drivers
2020-03-15 01:54:43 -07:00
Ryan Leckey
426361f361
sqlite: make SqliteConnection and Statement !Sync
2020-03-15 01:48:51 -07:00
Ryan Leckey
69b1d7feaa
sqlite: add even more notes about Send/Sync
2020-03-15 00:34:13 -07:00
Ryan Leckey
97b50b95c0
sqlite: ensure that we additionally clear the bindings when resetting the statement
2020-03-14 23:48:00 -07:00
Ryan Leckey
2abc451655
sqlite: re-order Executor methods
2020-03-14 23:45:14 -07:00
Ryan Leckey
21097e1436
sqlite: clarlify Sync guarantee
2020-03-14 23:45:03 -07:00
Ryan Leckey
dd99fc351c
suppress unused warnings
2020-03-14 19:54:19 -07:00
Ryan Leckey
cddaf1b34e
remove unused import for spawn_blocking
2020-03-14 19:47:36 -07:00
Ryan Leckey
69ea41de1e
sqlite: make the implementation far less naive
...
* WAL
* sync = NORMAL, thought on this for awhile, all signs point to this being a very good default for WAL usage
* separate worker thread per SQLite connection
2020-03-14 19:45:01 -07:00
Ryan Leckey
63ef32189d
sqlite: implement support for multiple statements
2020-03-14 17:43:44 -07:00
Ryan Leckey
0130fe1479
sqlite: implement describe
2020-03-14 17:43:44 -07:00
Ryan Leckey
5f27026459
sqlite: implement remainder of query API
2020-03-14 17:43:44 -07:00
Ryan Leckey
a3799c3496
sqlite: implement command execution
2020-03-14 17:43:44 -07:00
Ryan Leckey
751efdf31b
generalize MaybeOwnedConnection and clean up the connection file
2020-03-14 17:43:44 -07:00
Ryan Leckey
444ffff127
Run rustfmt
2020-03-14 17:43:44 -07:00
Ryan Leckey
30897dd6d9
Add additional notes to Executor
2020-03-14 17:43:44 -07:00
Ryan Leckey
0421c9fb42
Add explicit life times to Cursor
2020-03-14 17:43:44 -07:00
Ryan Leckey
1a48cf3b2c
Reduce some duplication in type parsing
2020-03-14 17:43:44 -07:00
Ryan Leckey
7ab07016da
sqlite: initial work in connection
2020-03-14 17:43:44 -07:00
Ryan Leckey
5d042e35b1
sqlite: stub
2020-03-14 17:43:44 -07:00
Ryan Leckey
553f03fa05
Add Database::RawBuffer to parameterize Encode
2020-03-14 17:43:44 -07:00
Ryan Leckey
cca096355f
Run rustfmt
2020-03-14 17:43:44 -07:00
Ryan Leckey
27cd552a8c
mysql: clean up protocol
2020-03-14 17:43:44 -07:00
Ryan Leckey
7a98253840
postgres: clean up protocol
2020-03-14 17:43:06 -07:00
Ryan Leckey
c7d416a1c3
Add Connection::begin
2020-03-14 17:43:06 -07:00
Ryan Leckey
cc88efe436
mysql: handle EOF packets if the server still requires them (MariaDB 10.1)
2020-03-14 17:29:59 -07:00
Ryan Leckey
12fa401556
log: trace the MySQL capability flags
2020-03-14 17:29:22 -07:00
Ryan Leckey
0a7415f542
Run rustfmt
2020-03-11 03:34:51 -07:00
Ryan Leckey
a165615f53
row: Row::get panics, Row::try_get is fallible, Query::map panics, Query::try_map is fallible
2020-03-11 03:32:52 -07:00
Ryan Leckey
9609a62ed1
Run rustfmt
2020-03-11 02:51:24 -07:00
Ryan Leckey
c14338d329
remove unused imports
2020-03-11 02:29:20 -07:00