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.

1234567891011121314151617181920
  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. //console.log(inQuery);
  9. db.transaction((tx) => {
  10. tx.executeSql(inQuery, inParams,
  11. (txobj, res) => inCallback(res),
  12. (txobj, err) => {
  13. console.error("query.js error |");console.log(err);
  14. })
  15. })
  16. }