Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a SQLite issue as, from what I understand, SQLite doesn't have a concept of "types" - only inferences on values:</p> <p><a href="http://www.sqlite.org/faq.html#q3" rel="nofollow noreferrer">http://www.sqlite.org/faq.html#q3</a> <a href="https://stackoverflow.com/questions/623044/how-to-alter-sqlite-column-iphone">How to ALTER sqlite column (iPhone)?</a></p> <p>What I'm guessing here is that the inference is getting lost on the float translation - if you read up the docs, it says as much:</p> <blockquote> <p>A column with NUMERIC affinity may contain values using all five storage classes. When text data is inserted into a NUMERIC column, an attempt is made to convert it to an integer or real number before it is stored. If the conversion is successful (meaning that the conversion occurs without loss of information), then the value is stored using the INTEGER or REAL storage class. If the conversion cannot be performed without loss of information then the value is stored using the TEXT storage class</p> </blockquote> <p>So it looks like the value you're passing in is NOT able to be stored as REAL (for some reason) and is trying to be tweaked to TEXT, with the limitation of a length of 8. This makes sense also because it's counting the decimal place - and it shouldn't (it only would if it's text).</p> <p>Have a read here: <a href="http://www.sqlite.org/datatype3.html#affinity" rel="nofollow noreferrer">http://www.sqlite.org/datatype3.html#affinity</a></p> <p>It looks like this is the issue you're dealing with. All in all, SQLite is a "ducktyped" database, and many people have been bitten by it.</p> <p>So, in short, I think your answer is probably to use Math.Round(3) to bring the value in under 8 total numbers + decimal (and the negative symbol) so it can be coerced into the column.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload