andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.75k stars 521 forks source link

queries don't get executed result callback function not running #486

Open lylest opened 3 years ago

lylest commented 3 years ago

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

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")}); }) }

codigocarvalho commented 3 years ago

You need to set space between table name and fields, check the docs to enablePromise.