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
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
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
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
c9eef8b030
fix(postgres): failure to detect errors on postgres 9.5
2020-06-07 05:09:51 -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
Ryan Leckey
ef2527ff3e
feat(mssql): fix a few bugs and implement Connection::describe
2020-06-07 02:00:31 -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
c64122c03f
feat(mssql): implement parameterized queries
2020-06-07 02:00:13 -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
Ryan Leckey
bb7c064bec
fix: error handling in main options examples
2020-06-01 05:35:13 -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
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
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
Austin Bonander
6913695588
add support for building in "decoupled" mode
2020-05-30 16:02:37 -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
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
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
Kristy Brambila
0e61642165
Make postgres type name resolution case-insensitive
2020-04-08 01:22:37 -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
Neeraj Jaiswal
c29fc5cccd
Remove matches dependency and use matches macro from std
2020-03-31 18:01:06 +05:30
Ryan Leckey
b65602d842
postgres: remove unused import
2020-03-30 18:52:52 -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
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
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