[TIMOB-27615] Getting data from sqlite column value "false" instead of "null"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-11-22T10:52:43.000+0000 |
Affected Version/s | Release 8.2.1 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | shishir.roy |
Assignee | Joshua Quick |
Created | 2019-11-20T07:47:01.000+0000 |
Updated | 2019-11-22T10:52:43.000+0000 |
Description
Hi,
I wanted to get the data from sqlite database but it is not returning expected value when i upgraded the Titianium SDK from 7.5.1.GA to 8.2.1.GA.
So in SDK 7.5.1.GA whenever empty value is fetch from sqlite database then its returing "null", but same thing in SDK 8.2.1.GA is returning "false".
Can you please provide some suggestion on this. We are going to upgrade our sdk to the latest version.
Note: This is happening in Android version 9.0 and iOS with same changes is working fine
Check below api is used for getting the value
var sql = Select something from sometable;
var executeQuery = Ti.App.AppDB.execute(sql);
while(executeQuery.isValidRow())
{
var somedata = executeQuery.fieldByName("somecolumn");
//somedata: null SDK 7.5.1.GA
//somedata: false SDK 8.2.1.GA
}
Any Update on this enquiry
Please provide the update on this enquiry
[~shishir.roy] What is the datatype of your attribute which is returning null/false? Thanks!
Data type is TEXT
[~shishir.roy] What does it return with TI SDK 8.2.1.GA?
Thanks!
var somedata = executeQuery.fieldByName("somecolumn"); Ti.API.info( typeof data); // I need to check this value Ti.API.info( data); // false
The specific row of column value was empty / null / false? Let me know what does it return with TI SDK 8.2.1.GA var somedata = executeQuery.fieldByName("somecolumn"); Ti.API.info( typeof somedata); Also, share your create table code. Thanks!
I am able to resolved this issue, you can closed this ticket
Thanks for your confirmation.