Comments (7)
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.
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.
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.
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.
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.
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.
but I do believe that smaller memory footprint would be the reason.
from laravel-oci8.
Related Issues (20)
- Undefined type 'Yajra\Oci8\PDO' in laravel 10.17.1 with latest Yajra composer HOT 2
- Method Yajra\\Oci8\\Query\\Grammars\\OracleGrammar::setConnection does not exist HOT 6
- The database driver's grammar implementation does not support escaping values. HOT 2
- Upsert feature HOT 3
- oci_connect(): ORA-12637: Packet receive failed HOT 2
- Materialized view HOT 2
- Case Sensitivity Issue with Alias Names HOT 2
- Improve pagination for newer oracle
- "sessionVars" config are ignored HOT 1
- Binding driver options are ignored when calling addBindingsToStatement method HOT 4
- OCI_DEFAULT Undefined HOT 2
- lock/lockForUpdate locks up all rows even combined with limit (Job Queue becomes unusable on large table) HOT 3
- Updating model with multiple blob columns fails
- DRCP Connection Pooling HOT 4
- Undefined type 'Yajra\Oci8\Oci8ServiceProvider'. HOT 5
- Method Yajra\Oci8\Schema\Grammars\OracleGrammar::compileColumns does not exist. HOT 2
- v10.4.3 introduced SQL error in SELECT FOR UPDATE HOT 4
- OracleProcessor.php function processColumns donot return key "auto_increment" HOT 2
- OCI_SUCCESS_WITH_INFO: ORA-28002: the password will expire within 13 days HOT 2
- Laravel 11 support is on the road? HOT 5
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 laravel-oci8.