Conversation
Introduce `wp db export --stdout`
Revert wp-cli#37 to remove `--stdout` for `wp db export`
Add test for validation for regex flags
…iter Add test for incorrect delimiter
Cater for reserved word column/table names in db search.
Change default regex delimiter to `chr(1)`
db search: fix match in context in non-regex case.
Search slash example no longer needs escaping.
fix wp db query example
update package tests
Update scaffolded README and tests with latest
|
At first I thought this PR was good for merging, but then I realized that it deviates considerably from #145 . I think this should be implemented as a
Are you up for another stab at this? |
|
This was the part I'm not quite clear on how to implement |
|
Aha, think I found what's needed, passing descriptors and reading from pipes. Making some progress on this. |
|
Something like this, but it will take an update to the I'll need to get the main wp-cli project setup locally for development in order to submit a PR for the run_mysql_command() update. |
|
@petenelson Looks like you've got ti figured out. Let me know if you need assistance with building something like the above. |
|
This will be greatly simplified by wp-cli/wp-cli#5384. |
|
@petenelson Are you still interested in working on this? It should be more straight-forward now, I've adapted |
|
Hey @petenelson, Gentle ping to see if you're still up for giving this another try... No worries at all if you can't find the time or energy, I would just appreciate knowing about that to decide what to do with the PR. |
|
Probably not right now. I'd need to get all of the development environment up and running again. |
|
Proceeding with wp-cli/wp-cli#5594 for this repository. I've captured this PR to https://gist.github.com/danielbachhuber/6924f9d9aa78fa3b2092943943bf45b7 in case this PR is auto-closed or broken in some way. |
b7d3057 to
5c185ba
Compare
This code addresses #145 by adding a
get-rowscommand to allow custom DB queries to get results formatted in a list, CSV, JSON, or a single column that can be piped to other commands.