You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

query.js 533B

1234567891011121314151617
  1. // https://github.com/expo/examples/blob/master/with-sqlite/App.js
  2. import * as SQLite from 'expo-sqlite';
  3. const db = SQLite.openDatabase("datacoucou.db");
  4. export function sqlite_exec_query(inQuery, inCallback){
  5. sqlite_exec_parameterised(inQuery, [], inCallback);
  6. }
  7. export function sqlite_exec_parameterised(inQuery, inParams, inCallback){
  8. db.transaction((tx) => {
  9. tx.executeSql(inQuery, inParams,
  10. (txobj, res) => inCallback(res),
  11. (txobj, err) => {console.log("er");console.log(err);})
  12. })
  13. }