-
Notifications
You must be signed in to change notification settings - Fork 10
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
scuttle doesn't convert binary values to binary #9
Comments
Oops, thanks @dankohn! I'll take a look. |
Ok, so after a little research, I couldn't find anything saying that |
The Rails Postgres driver saves boolean values as http://www.rubydoc.info/docs/rails/ActiveRecord/ConnectionAdapters/Column#FALSE_VALUES-constant The argument is that one of the main use cases of Scuttle is taking existing SQL generated by strings in Active Record, and running it through Scuttle to see what the Arel equivalent is. So, while someone could be manually testing against the strings |
Hey @dankohn, after doing some playing around in a rails console connected to both a MySQL and a PostgreSQL database, I now better understand how boolean values are treated:
This was something I'd never seen before because I've never really used Postgres. It seems awfully strange that Postgres supports a native boolean data type but stores single character strings in them - why use a byte when a single bit will do? As you said, maybe this is a driver-specific choice, not sure. In any case, I think the best I can do here is to add a check box or something to Scuttle's interface that enables/disables treatment of |
Thanks for doing the research. I agree a checkbox would work best, but It would also be great to automatically replace the postgres quotes at the
|
converts to:
I believe you should special case
t
andf
so that it converts to:The text was updated successfully, but these errors were encountered: