Comments (7)
Yes, it is because MySQL doesn't have boolean type. And, INT tiny represents it, but there is no way to get from MySQL tyne(1) or tiny(10) it is (checking).
from mariaex.
If you will try to save to tiny INT the value 0 or 1, than it is impossible by reading to get right representation, if it is boolean(true, false) or int(0, 1). Is it possible to avoid tiny INTs for integers in your setup?
from mariaex.
No I'm running a model generation script on a legacy database where the TINY ints are already setup. Is there no way to check the NUMERIC_PRECISION column in information schema to grab the size and set it as an integer/boolean based on that?
from mariaex.
Actually I guess you can't because it's always 3 for tinyints.
from mariaex.
To: @laurocaetano @josevalim
May be it make sense to decode tiny int always as int and cast 0, 1 to boolean on ecto side, where model types are available?
@nathanjohnson320 at least, on binary protocol it doesn't send any information about precision.
from mariaex.
@liveforeverx yes, we could do that. Once you change the behaviour in mariaex and release new version, please open up an issue in Ecto so we can fix it. Also, please release it as 0.3. :)
from mariaex.
@josevalim , off course, it is backwards incompatible change.
from mariaex.
Related Issues (20)
- Deploy 0.9.0 into hex.pm HOT 2
- mariaex error HOT 8
- leaks connections HOT 9
- Inserting large polygons HOT 1
- FunctionClauseError when connecting to a mysql db on azure
- Geometry is master branch but not released to Hex.pm HOT 1
- error when using cache_size = 1
- connections not closed properly? HOT 1
- Can't create more than max_prepared_stmt_count statements (current value: 16382) HOT 2
- Deprecation messages with Erlang/OTP 20 - Elixir 1.5.3
- Finish migration to DBConnection 2.0
- handle_handshake exceptions out on odd username circumstances
- version 0.8.5 not released HOT 4
- ssl recv timeout on mysql/percona 5.7 connection with TLS enabled HOT 3
- Connections not properly closed on errors HOT 8
- Invalid utf-8 byte sequences in varchar HOT 4
- Issue with inserting points HOT 1
- FunctionClauseError in Messages.decode_msg/2
- Time data type support for full range
- Support `decimal >= 2.0`
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 mariaex.