You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a float type of column that was only returning the integer portion of the value stored in my DB.
I had to change this in PGSQLitePlugin.m:
case SQLITE_FLOAT:
columnValue = [NSNumber numberWithFloat: sqlite3_column_int(statement, i)];
columnName = [NSString stringWithFormat:@"%s", sqlite3_column_name(statement, i)];
[entry setObject:columnValue forKey:columnName];
break;
to this to get the float:
case SQLITE_FLOAT:
columnValue = [NSNumber numberWithFloat: sqlite3_column_double(statement, i)];
columnName = [NSString stringWithFormat:@"%s", sqlite3_column_name(statement, i)];
[entry setObject:columnValue forKey:columnName];
break;
The text was updated successfully, but these errors were encountered:
Great !! If you send a pull request i will merge it as soon as i get home.
Davide Bertola (from iPhone)
Il giorno 04/mar/2012, alle ore 03:52, padzilla [email protected]
ha scritto:
I have a float type of column that was only returning the integer portion of the value stored in my DB.
I had to change this in PGSQLitePlugin.m:
case SQLITE_FLOAT:
columnValue = [NSNumber numberWithFloat: sqlite3_column_int(statement, i)];
columnName = [NSString stringWithFormat:@"%s", sqlite3_column_name(statement, i)];
[entry setObject:columnValue forKey:columnName];
break;
to this to get the float:
case SQLITE_FLOAT:
columnValue = [NSNumber numberWithFloat: sqlite3_column_double(statement, i)];
columnName = [NSString stringWithFormat:@"%s", sqlite3_column_name(statement, i)];
[entry setObject:columnValue forKey:columnName];
break;
Reply to this email directly or view it on GitHub: #9
I have a float type of column that was only returning the integer portion of the value stored in my DB.
I had to change this in PGSQLitePlugin.m:
case SQLITE_FLOAT:
columnValue = [NSNumber numberWithFloat: sqlite3_column_int(statement, i)];
columnName = [NSString stringWithFormat:@"%s", sqlite3_column_name(statement, i)];
[entry setObject:columnValue forKey:columnName];
break;
to this to get the float:
case SQLITE_FLOAT:
columnValue = [NSNumber numberWithFloat: sqlite3_column_double(statement, i)];
columnName = [NSString stringWithFormat:@"%s", sqlite3_column_name(statement, i)];
[entry setObject:columnValue forKey:columnName];
break;
The text was updated successfully, but these errors were encountered: