Giter Club home page Giter Club logo

Comments (3)

dougwilson avatar dougwilson commented on August 29, 2024

Good idea. Need to make sure we don't run in to Javascript number issues. The BIT field is up to 64 bits wide and of course a plain javascript number can only be 53 bits wide. Perhaps it would just always return a BigInt?

from mysql.

sidorares avatar sidorares commented on August 29, 2024

Oh, for some reason I assumed it's always just one byte. Not so sure about this change now, really depends on what's the most common use case in real life. If it's actually used as a "bit field" a Buffer might be a good container for it

from mysql.

dougwilson avatar dougwilson commented on August 29, 2024

Gotcha. Yes, I don't personally use the field, so not sure all the uses folks have for it. The field itself comes back as a length-encoded string field over the text protocol and the BIT type in the database can be between 1 and 64 bits. The string contents is just the binary data of the bits, not really much different from like a BINARY field, just that the length is defined in bits instead of bytes. I guess there is probably some kind of storage optimization possible for this but 🤷

from mysql.

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.