Ryan Leckey
7b132d1dbc
refactor(mysql): store max_size in MySqlTypeInfo – prepare for an eventual future where emit bool
for TINYINT(1)
2020-07-26 19:37:58 -07:00
Ryan Leckey
55f6c9a2e9
test: fix decode test in macros
2020-07-26 18:11:15 -07:00
Ryan Leckey
f298eb3cf1
Merge remote-tracking branch 'raftario/embedded-migrations'
2020-07-26 18:03:59 -07:00
Ryan Leckey
86d41f17aa
Merge remote-tracking branch 'origin/ab/macro-refresh'
2020-07-26 17:54:23 -07:00
Ryan Leckey
b61c0821ab
style: rustfmt
2020-07-24 08:07:44 -07:00
Ryan Leckey
3840d031c6
test: add a test case for YEAR support (as u16)
2020-07-24 08:07:07 -07:00
Ryan Leckey
08d2c79279
feat(postgres): expose PgTypeKind
2020-07-24 07:28:59 -07:00
Danny Weinberg
f0f93c4f79
Fix options in tests
2020-07-24 07:25:29 -07:00
Danny Weinberg
036bd2a05d
Add SCREAMING_SNAKE_CASE rename_all option
...
This mirrors the addition of `uppercase` in https://github.com/launchbadge/sqlx/pull/304 , but for all uppercase snake case.
2020-07-24 07:25:29 -07:00
Ryan Leckey
e575501a39
feat: add Executor::prepare, a hook into the automatic statement preparation life-cycle
2020-07-24 07:24:23 -07:00
Julius de Bruijn
e8a4c54ac7
Allow setting caching per-query
2020-07-24 07:24:23 -07:00
Julius de Bruijn
c9c11c8302
2-tier cache for Postgres
...
This solves a problem when needing to describe a query before executing
it, in cases where the query is more of a dynamic nature and binding its
parameters require the type info.
In this case, the first describe doesn't know the input parameters, so
the parameter type info is inferred from the database. In cases of
`varchar(10)[]` or `json` column types, the parameter type is inferred
to the column type. Now if we then try to use `text[]` or `jsonb` as the
types, the database has already stored different types for these
parameters for the statement, and will error out.
So we'll now only store the statement to the cache when it comes from an
actual execution of the query.
2020-07-24 07:24:23 -07:00
Julius de Bruijn
0c9bea4ab2
Fixing panics for disabled statement cache
2020-07-24 07:24:23 -07:00
Julius de Bruijn
a27244b3c9
Make the test simpler for easier debug
2020-07-24 07:24:23 -07:00
Julius de Bruijn
a4dc3dfbd7
Add a test showing a bug in describe/execute combo
2020-07-24 07:24:23 -07:00
Julius de Bruijn
590f97df4a
Caching describe
2020-07-24 07:24:23 -07:00
Raphaël Thériault
435445fbd0
Edit migrator to make it possible to create static instances
2020-07-23 17:54:05 -04:00
Raphaël Thériault
92646e00b8
Fix migrate! and add migration test
2020-07-23 17:46:27 -04:00
Austin Bonander
94aa698581
refactor(macros): remove ResultExt and macro_result!()
2020-07-21 21:19:31 -07:00
Ryan Leckey
ee4d9b5412
fix(postgres): use the element type info from the protocol if available for array element decoding
...
fixes #537
2020-07-20 23:53:18 -07:00
Ryan Leckey
ae8800ccc4
feat(postgres): add () for VOID in macro resolution
2020-07-20 23:12:43 -07:00
Ryan Leckey
cd4e8dc1cb
feat(mysql): support configuring the active charset and collation (via an automatic SET NAMES)
2020-07-20 23:07:22 -07:00
Ryan Leckey
cf78472d6d
fix(mysql): gate com_stmt_execute encode on non-empty params, not non-null params
2020-07-20 21:49:30 -07:00
Ryan Leckey
96b76dc737
update todo examples to 0.4 and use migrations
...
* update tests/x.py
* add examples/x.py
2020-07-18 05:43:16 -07:00
Ryan Leckey
14ecf5cbc4
test: make --target a prefix match and add --target-exact the old exact match
2020-07-18 03:26:55 -07:00
Ryan Leckey
9400a81cb0
test: switch tests/x.py to use host rustc for running tests
2020-07-18 03:18:25 -07:00
Ryan Leckey
f345c23e51
fix(mssql): handle multi-chunk packets
...
fixes #523
2020-07-17 06:08:36 -07:00
Ryan Leckey
9befdc81bf
test: add a regression test for the bugs discovered with #527
2020-07-17 04:56:58 -07:00
Ryan Leckey
fa40e9e55f
implement support for postgres TIMETZ type
...
Co-authored-by: Julius de Bruijn <julius+github@nauk.io>
2020-07-17 03:22:40 -07:00
Ryan Leckey
f4eb968c8d
test(sqlite): add DB parameter to Decode invocation
2020-07-17 03:22:40 -07:00
Ryan Leckey
6949b84e8c
style: rustfmt
2020-07-15 02:31:57 -07:00
Ryan Leckey
9b956c0d2c
fix(postgres): support the VOID type, as ()
2020-07-15 02:16:08 -07:00
Ryan Leckey
25b8fc7c04
fix(sqlite): support column types changing per row
2020-07-15 02:05:00 -07:00
Ryan Leckey
1247daec83
test: fix spurious ? in sqlite test
2020-07-14 08:52:42 -07:00
Ryan Leckey
54c857b448
fix some remaining usage of PoolOptions
2020-07-14 06:33:36 -07:00
Ryan Leckey
793f247604
refactor: PoolOptions::new() takes no parameters and the final .connect method takes the URI
2020-07-14 06:07:29 -07:00
Ryan Leckey
00137d4a04
feat: add sqlx::Done and return from Executor::execute()
...
+ Done::rows_affected()
+ Done::last_insert_id()
2020-07-14 04:31:25 -07:00
Ryan Leckey
93cab2a197
test: more pool usage adjustments
2020-07-12 05:02:40 -07:00
Ryan Leckey
fc682fa991
fix: adjust pool usage in tests and examples
2020-07-12 04:42:48 -07:00
OriolMunoz
993352e9d4
Support for #[sqlx(default)]
2020-07-12 03:57:17 -07:00
Mike Ledger
e731836e48
rust fmt wibble
2020-07-09 12:34:19 -07:00
Mike Ledger
03fcfc8562
concat test
2020-07-09 12:34:19 -07:00
Julius de Bruijn
f246d41aed
Fixed an overflow with a negative scale
2020-07-09 12:32:19 -07:00
Julius de Bruijn
245d53e484
Test Decimal conversions in my and pg
2020-07-09 12:32:19 -07:00
Julius de Bruijn
e3b3806db5
Handle ParameterStatus
in PgStream
2020-07-06 05:56:10 -07:00
Ryan Leckey
41df13ba5a
test(postgres): fix unreliable test that depends on the sequence number
2020-07-05 04:40:13 -07:00
Ryan Leckey
8d188c5f1a
feat: expose column information on Row
...
- add database-specific Column types: MySqlColumn, PgColumn, etc.
- add Row::columns() -> &[DB::Column]
- add Row::column(I) and Row::try_column(I)
2020-07-05 03:48:36 -07:00
Ryan Leckey
3b503a7764
feat(sqlite): clean up chrono support, add support for NaiveTime and NaiveDate
2020-07-04 05:51:46 -07:00
Ryan Leckey
7d22c0917f
Merge remote-tracking branch 'meteficha/felipesere-rebased'
2020-07-04 04:37:11 -07:00
agentsim
7810f7dcdd
Sqlite Collation Support ( #446 )
...
* Sqlite Collation Support
Adds a method create_collation to SqliteConnection.
Adds a unit test confirming the collation works as expected.
* Fix formatting
* Address feedback
Co-authored-by: Ryan Leckey <ryan@launchbadge.com>
2020-07-04 04:30:40 -07:00