{"action":"created","issue":{"url":"https://api.github.com/repos/jeremyevans/sequel/issues/1079","labels_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1079/labels{/name}","comments_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1079/comments","events_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1079/events","html_url":"https://github.com/jeremyevans/sequel/issues/1079","id":107289576,"number":1079,"title":"Does Sequel support BIT datatype for MySQL?","user":{"login":"kaltinril","id":4995472,"avatar_url":"https://avatars.githubusercontent.com/u/4995472?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltinril","html_url":"https://github.com/kaltinril","followers_url":"https://api.github.com/users/kaltinril/followers","following_url":"https://api.github.com/users/kaltinril/following{/other_user}","gists_url":"https://api.github.com/users/kaltinril/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltinril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltinril/subscriptions","organizations_url":"https://api.github.com/users/kaltinril/orgs","repos_url":"https://api.github.com/users/kaltinril/repos","events_url":"https://api.github.com/users/kaltinril/events{/privacy}","received_events_url":"https://api.github.com/users/kaltinril/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-18T22:36:14Z","updated_at":"2015-09-18T22:51:00Z","closed_at":"2015-09-18T22:51:00Z","body":"I'm getting back an odd value for BIT fields instead of TRUE/FALSE (1/0).\r\n\r\n expected: false\r\n      got: \"\\u0000\"\r\n\r\nI tried changed my test database to TinyInt instead of Bit, and this error goes away.\r\n\r\nI see in the code it supports TinyInt, does it also support bit?"},"comment":{"url":"https://api.github.com/repos/jeremyevans/sequel/issues/comments/141588192","html_url":"https://github.com/jeremyevans/sequel/issues/1079#issuecomment-141588192","issue_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1079","id":141588192,"user":{"login":"jeremyevans","id":3846,"avatar_url":"https://avatars.githubusercontent.com/u/3846?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyevans","html_url":"https://github.com/jeremyevans","followers_url":"https://api.github.com/users/jeremyevans/followers","following_url":"https://api.github.com/users/jeremyevans/following{/other_user}","gists_url":"https://api.github.com/users/jeremyevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyevans/subscriptions","organizations_url":"https://api.github.com/users/jeremyevans/orgs","repos_url":"https://api.github.com/users/jeremyevans/repos","events_url":"https://api.github.com/users/jeremyevans/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyevans/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T22:51:00Z","updated_at":"2015-09-18T22:51:00Z","body":"How bit fields are returned depends on the underlying driver (mysql, mysql2, etc.).  BIT in MySQL can be used for more than true/false, it is designed for storing a bit-field, not just a single bit (https://dev.mysql.com/doc/refman/5.0/en/bit-type.html).\r\n\r\nSequel supports emulating boolean via tinyint in the mysql and mysql2 adapters, it does not support emulating boolean via BIT in either, I believe."}}