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

Changing the way SQL works #2

Closed
dyatlov opened this issue Jun 30, 2015 · 1 comment
Closed

Changing the way SQL works #2

dyatlov opened this issue Jun 30, 2015 · 1 comment

Comments

@dyatlov
Copy link

dyatlov commented Jun 30, 2015

Instead of

pixql -i in.bmp -o out.bmp -q "SELECT WHERE COLOR = #FF0000FF; OPERATE SET COLOR = #00FF00FF;"

I'd rather prefer this syntax:

pixql -o out.bmp "UPDATE `in.bmp` SET COLOR=#00FF00FF WHERE COLOR = #FF0000FF"

this is simpler, uses just one query and has more convenient sql style

@Phildo
Copy link
Owner

Phildo commented Jun 30, 2015

I'll agree that it uses just one query, and that it has a more sql style, but I'm still on the fence regarding its simplicity/convenience (all still up for debate though, so I appreciate the input!).

For example, I assume the second appears more convenient in part due to your/my familiarity with other traditional SQLs. But I remember the first time I learned SQL, it was a bit perplexing that the "set value to this" comes before defining what variable you want to set...

The "mask with n statements, then operate with n statements" is definitely different, but it's clear and easily composabe, and continues to be such as queries get larger and more complex.

Thanks for the input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants