Skip to main content
added 45 characters in body
Source Link

Im storing Different types of Notes inside the SmartStore , currently im able to retrieve all the data from the smartnote table , but i need to use the Where condition to Retrieve a type of note. so i tried using

QuerySpec.buildSmartQuerySpec("select {Note:type} from {Note}" Where type=0"type='Uncategorized'", 1) but its not working im getting null value as result, so i tried using

    smartStore.query(QuerySpec.buildExactQuerySpec(
                    "Note","type","Uncategorized","type", QuerySpec.Order.ascending,1),0);

but im getting null as result , What am i doing wrong ?

Im storing Different types of Notes inside the SmartStore , currently im able to retrieve all the data from the smartnote table , but i need to use the Where condition to Retrieve a type of note. so i tried using

QuerySpec.buildSmartQuerySpec("select {Note:type} from {Note}" Where type=0", 1) but its not working , so i tried using

    smartStore.query(QuerySpec.buildExactQuerySpec(
                    "Note","type","Uncategorized","type", QuerySpec.Order.ascending,1),0);

but im getting null as result , What am i doing wrong ?

Im storing Different types of Notes inside the SmartStore , currently im able to retrieve all the data from the smartnote table , but i need to use the Where condition to Retrieve a type of note. so i tried using

QuerySpec.buildSmartQuerySpec("select {Note:type} from {Note}" Where type='Uncategorized'", 1) but its not working im getting null value as result, so i tried using

    smartStore.query(QuerySpec.buildExactQuerySpec(
                    "Note","type","Uncategorized","type", QuerySpec.Order.ascending,1),0);

but im getting null as result , What am i doing wrong ?

Source Link

Query data from SmartStore(Local) using Where Condition

Im storing Different types of Notes inside the SmartStore , currently im able to retrieve all the data from the smartnote table , but i need to use the Where condition to Retrieve a type of note. so i tried using

QuerySpec.buildSmartQuerySpec("select {Note:type} from {Note}" Where type=0", 1) but its not working , so i tried using

    smartStore.query(QuerySpec.buildExactQuerySpec(
                    "Note","type","Uncategorized","type", QuerySpec.Order.ascending,1),0);

but im getting null as result , What am i doing wrong ?