[Pkg-mozext-commits] [nostalgy] 157/235: Cosmetic.
David Prévot
taffit at alioth.debian.org
Tue Oct 8 20:42:11 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository nostalgy.
commit 8c0b50382a67d68f7d8bb7c90a01ebc41bad5ad1
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date: Sat May 30 06:33:07 2009 +0000
Cosmetic.
git-svn-id: http://nostalgy.googlecode.com/svn/trunk@157 56b81dcf-5a2f-0410-9db0-014be2e416ff
---
content/sqlite.js | 144 ++++++++++++++++++++++++++---------------------------
1 file changed, 72 insertions(+), 72 deletions(-)
diff --git a/content/sqlite.js b/content/sqlite.js
index 2a8f73e..8b20a35 100644
--- a/content/sqlite.js
+++ b/content/sqlite.js
@@ -1,75 +1,75 @@
var $sqlite = {
- storageService: [],
- mDBConn: [],
-
- _initService : function(file){
- var db = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
- db.append(file);
- this.storageService[file] = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService);
- this.mDBConn[file] = (this.storageService[file]).openDatabase(db);
-
- },
-
- select : function(file,sql,param){
- if (this.storageService[file]== undefined){
- this._initService(file);
- }
- var ourTransaction = false;
- if ((this.mDBConn[file]).transactionInProgress){
- ourTransaction = true;
- (this.mDBConn[file]).beginTransactionAs((this.mDBConn[file]).TRANSACTION_DEFERRED);
- }
- var statement = (this.mDBConn[file]).createStatement(sql);
- if (param){
- for (var m=2, arg=null; arg=arguments[m]; m++) {
- statement.bindUTF8StringParameter(m-2, arg);
- }
- }
- try{
- var dataset = [];
- while (statement.executeStep()){
- var row = [];
- for(var i=0,k=statement.columnCount; i<k; i++){
- row[statement.getColumnName(i)] = statement.getUTF8String(i);
- }
- dataset.push(row);
- }
- // return dataset;
- }
- finally {
- statement.reset();
- }
- if (ourTransaction){
- (this.mDBConn[file]).commitTransaction();
- }
- return dataset;
- },
-
-
- cmd : function(file,sql,param){
- if (this.storageService[file] == undefined){
- this._initService(file);
- }
- var ourTransaction = false;
- if ((this.mDBConn[file]).transactionInProgress){
- ourTransaction = true;
- (this.mDBConn[file]).beginTransactionAs((this.mDBConn[file]).TRANSACTION_DEFERRED);
- }
- var statement = (this.mDBConn[file]).createStatement(sql);
- if (param){
- for (var m=2, arg=null; arg=arguments[m]; m++) {
- statement.bindUTF8StringParameter(m-2, arg);
- }
- }
- try{
- statement.execute();
- }
- finally {
- statement.reset();
- }
- if (ourTransaction){
- (this.mDBConn[file]).commitTransaction();
- }
- }
+ storageService: [],
+ mDBConn: [],
+
+ _initService : function(file){
+ var db = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
+ db.append(file);
+ this.storageService[file] = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService);
+ this.mDBConn[file] = (this.storageService[file]).openDatabase(db);
+
+ },
+
+ select : function(file,sql,param){
+ if (this.storageService[file]== undefined){
+ this._initService(file);
+ }
+ var ourTransaction = false;
+ if ((this.mDBConn[file]).transactionInProgress){
+ ourTransaction = true;
+ (this.mDBConn[file]).beginTransactionAs((this.mDBConn[file]).TRANSACTION_DEFERRED);
+ }
+ var statement = (this.mDBConn[file]).createStatement(sql);
+ if (param){
+ for (var m=2, arg=null; arg=arguments[m]; m++) {
+ statement.bindUTF8StringParameter(m-2, arg);
+ }
+ }
+ try{
+ var dataset = [];
+ while (statement.executeStep()){
+ var row = [];
+ for(var i=0,k=statement.columnCount; i<k; i++){
+ row[statement.getColumnName(i)] = statement.getUTF8String(i);
+ }
+ dataset.push(row);
+ }
+ // return dataset;
+ }
+ finally {
+ statement.reset();
+ }
+ if (ourTransaction){
+ (this.mDBConn[file]).commitTransaction();
+ }
+ return dataset;
+ },
+
+
+ cmd : function(file,sql,param){
+ if (this.storageService[file] == undefined){
+ this._initService(file);
+ }
+ var ourTransaction = false;
+ if ((this.mDBConn[file]).transactionInProgress){
+ ourTransaction = true;
+ (this.mDBConn[file]).beginTransactionAs((this.mDBConn[file]).TRANSACTION_DEFERRED);
+ }
+ var statement = (this.mDBConn[file]).createStatement(sql);
+ if (param){
+ for (var m=2, arg=null; arg=arguments[m]; m++) {
+ statement.bindUTF8StringParameter(m-2, arg);
+ }
+ }
+ try{
+ statement.execute();
+ }
+ finally {
+ statement.reset();
+ }
+ if (ourTransaction){
+ (this.mDBConn[file]).commitTransaction();
+ }
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nostalgy.git
More information about the Pkg-mozext-commits
mailing list