Giter VIP home page Giter VIP logo

Comments (7)

FrancescoGd avatar FrancescoGd commented on July 17, 2024 1

Sorry for grave-digging this :D but I've just stumbled upon this problem myself... I believe the decision behind the boolean -> char mapping was due to Oracle's own AskTom suggestion about using it for storing Y/N values and not because of memory footprint.
Anyway, since the original answer, they changed their stance and suggested to use number fields instead. Localization issues are among the reasons given.
Here's the original discussion and relevant comment

from laravel-oci8.

AdamWillden avatar AdamWillden commented on July 17, 2024

In fact I might change my request as I've read up why char is used (1 byte rather than 2 for NUMBER). Is it at all possible to convert the data back to a boolean before handing it back to the app or is the type information not known when retrieving it from the database?

from laravel-oci8.

yajra avatar yajra commented on July 17, 2024

as far as i know, the type is not known after retrieving it from database. I guess you would have to manually convert it to boolean. Or use the Eloquent attribute to convert it to another type when retrieving the values.

from laravel-oci8.

AdamWillden avatar AdamWillden commented on July 17, 2024

Okay, good thinking, I'll use the eloquent accessors to make it a bool.

I take it that the reason behind using CHAR was the smaller memory footprint then? Thanks for your feedback anyway.

from laravel-oci8.

AdamWillden avatar AdamWillden commented on July 17, 2024

Just to follow up that eloquent accessors don't really help unless I make pivot models and also there's a number of areas we must use query builders for table joins which means the accessors won't do anything. I'll just have to accept that booleans are chars that need converting.

from laravel-oci8.

yajra avatar yajra commented on July 17, 2024

for the reason behind using char, will have to check it with JFelder, since he is the original author on blueprint and this is just a fork of his works. :)

from laravel-oci8.

yajra avatar yajra commented on July 17, 2024

but I do believe that smaller memory footprint would be the reason.

from laravel-oci8.

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.