-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REAL number with double-precision truncated/rounded (iOS version) #199
Labels
Comments
The following change fixes the issue (and passes the other tests): --- a/src/ios/SQLitePlugin.m
+++ b/src/ios/SQLitePlugin.m
@@ -410,7 +410,7 @@ static void sqlite_regexp(sqlite3_context* context, int argc, sqlite3_value** va
#endif
break;
case SQLITE_FLOAT:
- columnValue = [NSNumber numberWithFloat: sqlite3_column_double(statement, i)];
+ columnValue = [NSNumber numberWithDouble: sqlite3_column_double(statement, i)];
break;
case SQLITE_NULL:
columnValue = [NSNull null]; |
brodycj
pushed a commit
that referenced
this issue
Mar 6, 2015
brodycj
pushed a commit
that referenced
this issue
Mar 10, 2015
Fixes: - #193: workaround for Android db locking/closing issue - #144: convert array parameters to string to match Web SQL - #199: fix double-precision REAL values in result for iOS version - #150/#153: close Android db before removing from map - Fix truncation in iOS query result in case of UNICODE NULL (\0 or \u0000) (ref: PR #170) - Some fixes for error handling to be consistent with Web SQL (ref: PR #170) Testing ONLY: - #147: testing with UNICODE line separator - #195: Reproduce issue with double-precision REAL number on WP(8) ONLY
brodycj
pushed a commit
that referenced
this issue
Mar 10, 2015
Fixes: - #193: workaround for Android db locking/closing issue - #144: convert array parameters to string to match Web SQL - #199: fix double-precision REAL values in result for iOS version - #150/#153: close Android db before removing from map - Fix truncation in iOS query result in case of UNICODE NULL (\0 or \u0000) (ref: PR #170) - Some fixes for error handling to be consistent with Web SQL (ref: PR #170) Testing ONLY: - #147: testing with UNICODE line separator - #195: Reproduce issue with double-precision REAL number on WP(8) ONLY
The fix has been tested and published. |
brodycj
pushed a commit
that referenced
this issue
Mar 10, 2015
Related to the following fixes: - #193: workaround for Android db locking/closing issue - #144: convert array parameters to string to match Web SQL - #199: fix double-precision REAL values in result for iOS version - #150/#153: close Android db before removing from map - Fix truncation in iOS query result in case of UNICODE NULL (\0 or \u0000) (ref: PR #170) - Some fixes for error handling to be consistent with Web SQL (ref: PR #170)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As reported in the forum: https://groups.google.com/d/msg/cordova-sqliteplugin/01Zzh2m-iiQ/dpxj7vF6ZVIJ
Reproduced by the following test:
The double-precision decimal number is working OK in the Android & WP(8) versions.
The text was updated successfully, but these errors were encountered: