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
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
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
371e843bb2
mysql: remove random println
2020-03-31 03:00:31 -07:00
Ryan Leckey
d820763bb9
mysql: infer empty password to mean no password
2020-03-30 18:42:25 -07:00
Ryan Leckey
4ec9e9fce2
mysql: remove MySqlTypeInfo from mysql::types
2020-03-29 16:00:02 -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
41608c3f60
rename {DB}Error -> {DB}DatabaseError
2020-03-25 04:50:27 -07:00
Ryan Leckey
6049f976f9
opt out of compatible type check for null values
2020-03-25 04:25:38 -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
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
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
fa4138b25c
add docs to explain the SQL <-> Rust mapping
2020-03-24 02:56:52 -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
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
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
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
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
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
Austin Bonander
8328e07c97
macros + sqlite: fix error for null-typed columns
2020-03-17 21:10:19 -07:00
Ryan Leckey
21059620dc
mysql: support understanding ENUM as TEXT
2020-03-17 19:26:31 -07:00
Ryan Leckey
ced6713f57
add trailing newline
2020-03-17 01:11:15 -07:00
Tom Dohrmann
c3aeb275c2
add derive macros for weak & strong enums and structs
2020-03-16 22:58: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
1d0100b35d
Add DatabaseError::code
2020-03-16 18:29:41 -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
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
426361f361
sqlite: make SqliteConnection and Statement !Sync
2020-03-15 01:48:51 -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
1a48cf3b2c
Reduce some duplication in type parsing
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