rem: var query = qaNotifications.db.createStatement("SELECT id FROM notifications \ WHERE id = ?1"); query.bindStringParameter(0, this.id); var foundRow; while (query.executeStep()) { foundRow = 1; } query.reset(); if (foundRow == 1) { return; }  var sth = qaNotifications.db.createStatement("INSERT into notifications \ values (?1, ?2, ?3, ?4, ?5)"); sth.bindStringParameter(0, this.id); sth.bindStringParameter(1, this.datetime); sth.bindStringParameter(2, this.hasHadFirstNotification); sth.bindStringParameter(3, this.hasHadSecondNotification);   this.serializedJSData = null; var jsData = MochiKit.Base.serializeJSON(this); sth.bindStringParameter(4, jsData);  sth.execute(); }, 
add: var query = qaNotifications.db.createStatement("SELECT id FROM notifications \ WHERE id = ?1"); query.bindStringParameter(0, this.id); var foundRow; while (query.executeStep()) { foundRow = 1; } query.reset(); if (foundRow == 1) { return; }  var sth = qaNotifications.db.createStatement("INSERT into notifications \ values (?1, ?2, ?3, ?4, ?5)"); sth.bindStringParameter(0, this.id); sth.bindStringParameter(1, this.datetime); sth.bindStringParameter(2, this.hasHadFirstNotification); sth.bindStringParameter(3, this.hasHadSecondNotification);   this.serializedJSData = null; var jsData = MochiKit.Base.serializeJSON(this); sth.bindStringParameter(4, jsData);  sth.execute(); }, 
context: 	serializeToDb: function() {		var query = qaNotifications.db.createStatement("SELECT id FROM notifications \			WHERE id = ?1");		query.bindStringParameter(0, this.id);		var foundRow;		while (query.executeStep()) {			foundRow = 1;		}		query.reset();		if (foundRow == 1) { // it's already been inserted, so update			return;		}				var sth = qaNotifications.db.createStatement("INSERT into notifications \			values (?1, ?2, ?3, ?4, ?5)");		sth.bindStringParameter(0, this.id);		sth.bindStringParameter(1, this.datetime);		sth.bindStringParameter(2, this.hasHadFirstNotification);		sth.bindStringParameter(3, this.hasHadSecondNotification);				// avoid having serialized data inside serialized data:		this.serializedJSData = null; 		var jsData = MochiKit.Base.serializeJSON(this);		sth.bindStringParameter(4, jsData);			sth.execute();	},
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/838a3f38df6e9bd6fd899d9909b263e01aed1e26/notifications.js/clean/testing/extensions/community/chrome/content/notifications.js