Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const sqlite = require('nativescript-sqlite');
const ObservableArray = require("tns-core-modules/data/observable-array").ObservableArray;
//var Tracing = require('./tracing.js');
//Tracing(sqlite, {ignore: ["close", "resultType", "valueType", "_toStringArray", "_getResultEngine"], disableAddedFunction: true});
var dbname = 'name_db.sqlite';
var db = null;
var enc_db = null;
var page = null;
var data = new ObservableArray();
if (sqlite.HAS_COMMERCIAL) {
console.log("Using Commercial");
data.push({name:'Commercial Support', css:'one'});
} else {
console.log("No Commercial Support");
}
if (sqlite.HAS_ENCRYPTION) {
console.log("Using Encryption");
//dbname = 'encrypted.sqlite';
data.push({name:'Encryption Support', css:'one'});
} else {
console.log("No Encryption");
}
data.push({name: 'Loading...', css: 'one'});
function runPreparedTests(callback) {
if (!sqlite.HAS_COMMERCIAL) {
callback();
return;
}
db.resultType(sqlite.RESULTSASARRAY);
db.valueType(sqlite.VALUESARENATIVE);
setupPreparedTests(function() {
createPreparedData(true, function () {
let tests = [{
name: 'Verify Rollback Check',
sql: 'select count(*) from preparetests',
results: [0],
use: 0
}];
runTestGroup(tests, function () {