Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UPDATE / DELETE operations #32

Open
zhcy opened this issue Jun 23, 2017 · 2 comments
Open

Add support for UPDATE / DELETE operations #32

zhcy opened this issue Jun 23, 2017 · 2 comments

Comments

@zhcy
Copy link

zhcy commented Jun 23, 2017

Would you mind add update support to this tool.
eg.update dest = 'xxxx' to copy select result file to dest folder.
or delete from where XXX
I just want this tool long ago. Thanks in advance.

@kashav
Copy link
Owner

kashav commented Jun 25, 2017

Hey @zhcy, thanks for the request! I'll definitely consider implementing something like this. It might require a large refactor though, so I can't guarantee anything. You should know that you can use common unix tools to accomplish some of these things, take a look at xargs.

For example, to copy all files with the name foo to ~/Desktop/bar:

$ mkdir -p ~/Desktop/bar
$ fsql "SELECT FULLPATH(name) FROM . WHERE name = foo" | xargs -I {} cp {} ~/Desktop/bar

Although I do agree that something like the following is a lot nicer to use.

$ fsql "COPY TO ~/Desktop/bar FROM . WHERE name = foo"

@zhcy
Copy link
Author

zhcy commented Jun 26, 2017

@kshvmdn
Thanks for your reply. My main working environment is windows os (I think many people the same).
I do like unix tools,but sometimes I can't use it.
And I prefer "sql" this style
update dest = '~/Desktop/bar' FROM . WHERE name = foo
OR delete FROM . WHERE name = foo
Anyway,Thanks for your work.

@kashav kashav changed the title please support update make it more useful Add support for UPDATE / DELETE operations Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants