1234567891011121314151617181920 |
- // https://github.com/expo/examples/blob/master/with-sqlite/App.js
- import * as SQLite from 'expo-sqlite';
-
- const db = SQLite.openDatabase("datacoucou.db");
-
-
- export function sqlite_exec_query(inQuery, inCallback){
- sqlite_exec_parameterised(inQuery, [], inCallback);
- }
-
- export function sqlite_exec_parameterised(inQuery, inParams, inCallback){
- //console.log(inQuery);
- db.transaction((tx) => {
- tx.executeSql(inQuery, inParams,
- (txobj, res) => inCallback(res),
- (txobj, err) => {
- console.log("query.js error |");console.log(err);
- })
- })
- }
|