Giter VIP home page Giter VIP logo

Comments (3)

rexxars avatar rexxars commented on August 24, 2024

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.

jonny827 avatar jonny827 commented on August 24, 2024

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 .

  1. 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.
  2. 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.

rexxars avatar rexxars commented on August 24, 2024

Thanks for the feedback, I agree with your conclusions. Closing this.

from sql-to-graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.