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

Creating Table in sqlite-web browser and BOOL data type is returning INTEGER #25

Closed
victordomin opened this issue Nov 4, 2016 · 2 comments

Comments

@victordomin
Copy link

When creating tables in sqlite_web browser, I am running into trouble when trying to set the data type of a given field to BOOL; it instead returns INTEGER. The bottom three key-value pairs are supposed to be a BOOL (see image):

image

When I go to the "Create Column" page and name a field and set its data type to BOOL, it is properly displaying BOOL from the dropdown box. However, after hitting the "Add Column" button and returning to the structure page, both the SQL and the columns sections show the data type as INTEGER.

Am I missing something here? Is this normal behavior? Is INTEGER functioning as a BOOL in a C-like manner where the field value 0 = false and 1 = true?

@coleifer
Copy link
Owner

coleifer commented Nov 4, 2016

SQLite does not have a boolean type, so behind-the-scenes we use an integer field with 0 and 1. These are really the only data-types supported: https://www.sqlite.org/datatype3.html

So there's not even varchar, just TEXT.

@victordomin
Copy link
Author

Thanks for getting back to me! I sort of figured that's what was going on. I'm not the most familiar with SQLite yet—probably should have spent more time in the docs.

Thanks again!

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