
 
function UserDatabase(name){ 
    var DB_NAME = 'pg-demo-indexeddb-user';
    var DB_VERSION = 1; // Use a long long for this value (don't use a float)
    var DB_STORE_NAME = 'user_' + name;

    this.readSql = function(){
      var str = localStorage.getItem(DB_STORE_NAME);
      
      return JSON.parse(str);
     };
     
     this.wirteSql = function(sSvr ,sID){
        var value = {addr: sSvr,id:sID};
        var str = JSON.stringify(value);
        localStorage.setItem(DB_STORE_NAME,str);
     };
}

module.exports = UserDatabase;