I am trying to query the database and there are some cases where a value could be null. The issue is that I don't get a results back when trying to query where a value could be null
I need to be able to keep the format using value array because the values will be coming from variable which will be dynamic. I just used static values to provide example of issue
tx.executeSql(
'SELECT * FROM MidiMap WHERE profileId= ? AND midiType= ? AND other= ?;',
[
1234567890,
'noteOff',
null // <-----not working
],
tx.executeSql(
'SELECT * FROM MidiMap WHERE profileId= ? AND midiType= ? AND other= ?;',
[
1234567890,
'noteOff',
undefined // <----- not working
],
tx.executeSql(
'SELECT * FROM MidiMap WHERE profileId= ? AND midiType= ? AND other= ?;',
[
1234567890,
'noteOff',
NULL // <----- React do not accept this as a value
],
tx.executeSql(
'SELECT * FROM MidiMap WHERE profileId= ? AND midiType= ? AND other= ?;',
[
1234567890,
'noteOff',
"NULL" // <----- This SQL Library dos not understand this value here
],
// Below Works perfectly
tx.executeSql(
'SELECT * FROM MidiMap WHERE profileId= 1234567890 AND midiType= "noteOff" AND other= NULL;',
[]
I am trying to query the database and there are some cases where a value could be null. The issue is that I don't get a results back when trying to query where a value could be null
I need to be able to keep the format using value array because the values will be coming from variable which will be dynamic. I just used static values to provide example of issue