Ryan Leckey
51c5d82fec
fix: remove macro_result wrapper from migrate!
2020-07-26 18:06:06 -07:00
Ryan Leckey
c454e1ea35
style: remove unused import
2020-07-26 18:05:55 -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
Julius de Bruijn
8eb8661945
Allow decoding a YEAR
value as uint from MySQL
2020-07-24 08:05:54 -07:00
Jonas Platte
adfa2d2161
sqlx-cli: Upgrade console dependency
2020-07-24 07:54:06 -07:00
Jonas Platte
979ddeb222
cargo-sqlx-cli: Fix exiting with 0 on failure
2020-07-24 07:54:06 -07:00
Ryan Leckey
40f0a22765
Merge remote-tracking branch 'magurotuna/doc-links'
2020-07-24 07:33:27 -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
bd6b6e0365
Make names match their corresponding styles
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
bfa29e521b
Implement Debug for statements
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
9839043b6d
Cache column and parameter info in mysql
2020-07-24 07:24:23 -07:00
Julius de Bruijn
590f97df4a
Caching describe
2020-07-24 07:24:23 -07:00
Austin Bonander
41bf5e30ee
docs(macros): mention interpreting EXPLAIN
output for SQLite
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-23 20:19:08 -07:00
Austin Bonander
4da66c9200
fix(macros): fix checked = false
being ignored
...
for arguments
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-23 19:53:08 -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
Raphaël Thériault
39b3e4a966
Normalise path resolution accross migrate! and query_file!
2020-07-23 17:11:35 -04:00
Raphaël Thériault
0eb63b7eae
Fix migrate! and improve docs
2020-07-23 16:47:32 -04:00
Raphaël Thériault
8381e87d4a
Document migrate! (and small fixes)
2020-07-23 15:25:13 -04:00
Raphaël Thériault
e5e9665bd9
Add migrate! macro for embedded migrations
2020-07-23 14:22:50 -04:00
Raphaël Thériault
60c3ece671
Edit Migration and Migrator to make embedded migrations possible
2020-07-23 12:57:48 -04:00
Yusuke Tanaka
0890313259
doc: fix wrong links
2020-07-24 00:31:05 +09:00
Martin Risell Lilja
eba6f3973d
Remove sneaky 'println!' in sqlite chrono.
2020-07-23 03:36:27 -07:00
ABGH, C
dad1356147
Remove unused phf dependency
2020-07-22 17:58:23 -07:00
Austin Bonander
67ad43491d
doc: adjust macros documentation
...
Signed-off-by: Austin Bonander <austin@launchbadge.com>
2020-07-21 22:40:13 -07:00
Austin Bonander
94aa698581
refactor(macros): remove ResultExt and macro_result!()
2020-07-21 21:19:31 -07:00
Jonas Platte
d79335d955
Add an openssl-vendored feature to sqlx-cli
...
… to allow building for musl targets
2020-07-21 08:01:55 -07:00
Ryan Leckey
e4dc040620
style: rustfmt
2020-07-20 23:53:36 -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
6a70780f45
chore: update lockfile
2020-07-20 23:13:05 -07:00
Ryan Leckey
78fe88f51b
style: rustfmt
2020-07-20 23:12:52 -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
dc0d325738
fix: type annotate a conversion in mysql/str
2020-07-19 19:14:26 -07:00
Raphaël Thériault
41261862d3
Implement DerefMut and AsMut for Json
2020-07-18 21:55:13 -07:00
Ryan Leckey
cdd88b5338
feat: support ancient mysql versions (5.0+)
2020-07-18 21:43:05 -07:00
Ryan Leckey
49ffcf6f46
feat: add PgListener#try_recv to give users a chance to act on lost connection if desired
...
closes #447
2020-07-18 21:05:36 -07:00
Ryan Leckey
47772b0850
docs: add derive docs for sqlx::Type
2020-07-18 20:37:50 -07:00