Comments (3)
Maybe it would be a good idea to run something similar to:
SELECT 1 FROM tableName WHERE tinyintColumn NOT IN(0, 1) LIMIT 1
. If there are any values that are not 0/1, we can keep it as an integer, otherwise treat it as a boolean?
from sql-to-graphql.
I have been following this project for some time. I have not written any GraphQL by hand and was hoping to use your tool. I would like to provide feedback for this if I may since i do have quite a bit of research and thought put into this from another thread through the Doctrine ORM project. They recently moved their JIRA over to Gitbub issues/pull requests so check out - doctrine/dbal#1205 .
- Do not assume int(1) or tinyint(1) are booleans. First int(1) still stores the ENTIRE value of INT(all 11 digits) it however only send the 1st back in the result set. Meaning from my understanding the value in (1) is only a display length value not a store length value. Secondly, Tinyint(1) as in my article can be used to store up to 255 values if unsigned. Map boolean only to explicit boolean.
- These above approaches require database developers to be more thorough in their design, and declarative in their field types, and still give your tool the power of flexibility because you are not typing a develop into having to hack his design for example tinyint(2) if for example he is trying to store the value "7" as in the days of the week enum in order to prevent your script from trying to force a boolean value.
Keep up the solid work on this project as your project will save developers hundreds of hours of tedious writing of schemas and get them back to write functionality.
from sql-to-graphql.
Thanks for the feedback, I agree with your conclusions. Closing this.
from sql-to-graphql.
Related Issues (20)
- Add Support Many-To-One (n:1) relationship mappings? HOT 2
- Error running the first stage HOT 4
- Postgres types are not recognized? HOT 10
- Unhandled exception for mySQL database HOT 1
- Error Pool2 - Error: connect ETIMEDOUT
- MySQL JSON column type throws error. HOT 2
- Getting error "Unhandled rejection Error" when using with mysql HOT 2
- support to oracle HOT 1
- Required fields HOT 4
- GraphQL version too old
- Use Join Monster
- Incorrect connection object for sqlite database
- Migrate to ES6 HOT 1
- Better GraphQL -> SQL HOT 1
- Detect database foreign keys HOT 9
- Please update sqlite3 library version from 3.x to 4.x
- TypeError: (db || "<not set>").toLowerCase is not a function
- Does it support to be used in a programmatic way not just command line?
- Can Graphql Subscription capture change directly on Oracle Database like Hasura?
- Join forces "taviroquai/db2graphql" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql-to-graphql.