documentation of database initialization

databaseInit.js

// import dexie module
var Dexie = require('dexie');

// intialize databse table
var database = new Dexie("Patternscape");

// initialize database schema
database.version(2).stores({
    Patterns: 'pattern,address,popularity',
    UserData: 'key, value'
})
/**
 * initialize user preference values in database
 * these will be modified at runtime
 */
function add_user_preference()
/**
 * function to lookup/find pattern in database 
 * @param {string} partialPattern partial pattern string entered in gui for pattern search
 */
async function starts_with_ignore_case(partialPattern)
/**
 * function to get addresses of patterns stored in database
 * @param {string} patternString pattern selected by user
 */
async function get_address_of_pattern_file(patternString)
/**
 * function to find patterns start with any of strings in database
 * and returns patterns which are matching with those strings
 * @param {string array} targetDataArray array of string (email, name, etc )
 */
async function equals_any_of(targetDataArray)