react-native-sqlite-storage
react-native-sqlite-storage copied to clipboard
queries don't get executed result callback function not running
queries don't get executed result callback function not running
Expected Behavior
create a table if does not exist and view my data
Current Behavior
the result callback function returns nothing
Your Environment
-
react-native-sqlite-storage": "^5.0.0"
my code
const createTable = async () => { await db.transaction((tx) => { tx.executeSql("CREATE TABLE IF NOT EXISTS" +"chat_sms" +"(ID INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255) NOT NULL);", [], ()=>{console.log("someth")}); }) }
You need to set space between table name and fields, check the docs to enablePromise.