95 Commits

Author SHA1 Message Date
Austin Bonander
a2eda2de24
WIP [next]: implement generalized query placeholders
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-07-16 16:39:01 -07:00
davidj-lb
ea50e6dccb
feat(core): Added error downcasting in the style of the master branch (#1252) 2021-05-27 15:55:42 -07:00
David Johnson
a7452d76f3 feat(core): Fixed some typos, renamed the id() function to position(), and used .left() and .right() on the Either (all in Argument) 2021-05-20 12:51:46 -07:00
David Johnson
e2bcfb8d26 feat(core): Added name() and id() functions to Argument that both return optional and Arguments::named() to get an iterator over named arguments 2021-05-20 12:51:46 -07:00
Ryan Leckey
e7664d8d19 feat(postgres): add support for SQL NULL to Option<_> and sqlx::Null 2021-04-16 16:10:02 -07:00
Ryan Leckey
3d575495e7 style: rustfmt 2021-04-16 11:49:47 -07:00
Ryan Leckey
76b31faf4c feat(postgres): catch and return PgDatabaseError for ErrorResponse 2021-04-16 11:44:14 -07:00
Ryan Leckey
8dcaa039c8 feat(mysql): disable parameter type check on older MySQL, add support for NULL 2021-04-16 00:39:21 -07:00
Ryan Leckey
949b644503 style: rustfmt 2021-03-27 17:12:03 -07:00
Ryan Leckey
f12035c8d4 refactor: settle on identifiers for lifetimes and type parameters in Executor 2021-03-25 16:17:07 -07:00
Ryan Leckey
a48f4f6753 refactor: remove sqlx wrappers around DbConnection and DbConnectOptions
- traits are needed for some operations again
 - this should be circled back to once we can do impl !Trait
2021-03-25 11:36:47 -07:00
Jonas Platte
de0f31cc0b Enforce consistent imports granularity through rustfmt 2021-03-22 12:14:06 -07:00
Ryan Leckey
cc2f2c1f72
style: rustfmt 2021-03-20 09:42:56 -07:00
Ryan Leckey
6d869bef7e
feat(core): add Error::Client and ClientError to represent a general client error, replacing Error::Protocol 2021-03-20 00:02:25 -07:00
Ryan Leckey
3bd6a5a356
fix: QueryResult should be Clone + Default 2021-03-07 10:35:54 -08:00
Ryan Leckey
baa63d33e1
refactor(postgres): baseline postgres driver against the now near-complete state of the mysql driver 2021-03-06 13:59:24 -08:00
Ryan Leckey
f49d9f3e83
refactor: simplify mocked stream testing 2021-03-03 17:42:00 -08:00
Ryan Leckey
4204f1dc16
feat: expose Connection::describe 2021-02-28 12:18:53 -08:00
Ryan Leckey
635bb3e8f1
fix(core): show argument index as starting from 0 2021-02-27 00:50:02 -08:00
Ryan Leckey
85c11b3f2f
style: remove unused imports 2021-02-26 00:23:40 -08:00
Ryan Leckey
6b5f37dfb1
feat(core): add sqlx::RawValue 2021-02-26 00:19:42 -08:00
Ryan Leckey
5e1743fd3f
refactor(core): do not convert encode or decode errors into sqlx::Error automatically 2021-02-26 00:18:15 -08:00
Ryan Leckey
59eb42610d
refactor(core): store parameter index or name in Argument for error messages 2021-02-26 00:17:49 -08:00
Ryan Leckey
2c66bcf19f
feat(core): expand and document Row 2021-02-26 00:04:55 -08:00
Ryan Leckey
ecb4bd0281
feat(core): add TypeNotCompatible error variants to Decode and Encode Error 2021-02-26 00:04:29 -08:00
Ryan Leckey
2934a18af4
fix(core): bind non-object-safe pieces of Type to Argument for later use
- allows for TypeDecode and TypeEncode to be simple Type + X aliases
2021-02-26 00:03:40 -08:00
Ryan Leckey
a92925a045
fix(core): require that RawValue::Database == other database associated types 2021-02-26 00:02:14 -08:00
Ryan Leckey
1107241170
feat(core): add query_as, FromRow 2021-02-23 02:28:09 -08:00
Ryan Leckey
22960f1610
feat(mysql): add support for &str and &[u8] 2021-02-23 01:51:21 -08:00
Ryan Leckey
d2da565d0b
refactor: remove unsafe for utf8 conversions within protocol 2021-02-22 23:41:22 -08:00
Ryan Leckey
3df0743bdf
fix(core): use cmp::max instead of infix max 2021-02-22 23:02:44 -08:00
Ryan Leckey
eddd873f4d
feat(core): add Row::get, Row::get_raw 2021-02-22 21:35:51 -08:00
Ryan Leckey
21f3a83c5f
feat(core): add Row::column, Row::try_column (from 0.5) 2021-02-22 21:32:52 -08:00
Ryan Leckey
d8e4030cb8
refactor: rename ordinal to index 2021-02-22 21:29:05 -08:00
Ryan Leckey
3470195839
feat(core): add ColumnIndex 2021-02-22 21:22:04 -08:00
Ryan Leckey
2b99b1aeaf
feat(core): expand variants and documentation of sqlx::Error 2021-02-22 18:57:06 -08:00
Ryan Leckey
301665360c
wip: plan out transaction options, to mirror connect options 2021-02-19 21:41:42 -08:00
Ryan Leckey
9413146bb7
style(core): clippy 2021-02-18 23:59:11 -08:00
Ryan Leckey
3078957a66
feat(core): implement Executor for blocking runtimes 2021-02-18 23:58:59 -08:00
Ryan Leckey
562ea39ee3
fix: resolve new future-incompatible lint, trailing ; on macros 2021-02-18 23:50:36 -08:00
Ryan Leckey
943f1e441a
style: remove unused imports 2021-02-18 23:46:07 -08:00
Ryan Leckey
1f28e7b0b3
feat(core): use a blanket impl for TypeEncode 2021-02-18 23:46:07 -08:00
Ryan Leckey
7db850da71
feat(mysql): thread E: Execute through the executor
+ handle normal errors separate from unexpected errors, an unexpected
   error causes the connection to close (in which case, if this was
   behind a pool, the pool would not allow this connection to be
   acquired again)
2021-02-18 23:46:07 -08:00
Ryan Leckey
d7151f3871
feat(core): add Execute 2021-02-18 23:46:06 -08:00
Ryan Leckey
367633a00a
feat(core): add Arguments::positional, returns an iterator over positional parameters 2021-02-18 23:46:06 -08:00
Ryan Leckey
46f314103a
feat(core): add TypeEncode::compatible 2021-02-18 23:46:06 -08:00
Ryan Leckey
ed3e9fdd38
feat(core): add Arguments, arguments::Argument, and arguments::ArgumentIndex 2021-02-18 23:46:06 -08:00
Ryan Leckey
831df74b93
feat(core): add Type, TypeEncode, and TypeDecode 2021-02-18 23:46:06 -08:00
Ryan Leckey
f7516ea22d
feat(core): add TypeInfo, Database::TypeInfo, Database::TypeId, and Column::type_info 2021-02-18 23:46:05 -08:00
Ryan Leckey
7f036dfb4a
style: remove unused imports 2021-02-18 23:46:05 -08:00