PawSQLite-WebSQL-Adapter/lib/pawsqlite-websql-adapter.js.map

1 line
11 KiB
Plaintext
Raw Normal View History

2021-03-02 18:09:39 -08:00
{"version":3,"sources":["webpack://pawsqlite-websql-adapter/./src/database_wrapper.mjs","webpack://pawsqlite-websql-adapter/./src/log.mjs","webpack://pawsqlite-websql-adapter/./src/response_wrapper.mjs","webpack://pawsqlite-websql-adapter/./src/result_mapper.mjs","webpack://pawsqlite-websql-adapter/./src/transaction_manager.mjs","webpack://pawsqlite-websql-adapter/./src/websql_adapter_error.mjs","webpack://pawsqlite-websql-adapter/webpack/bootstrap","webpack://pawsqlite-websql-adapter/webpack/runtime/define property getters","webpack://pawsqlite-websql-adapter/webpack/runtime/hasOwnProperty shorthand","webpack://pawsqlite-websql-adapter/webpack/runtime/make namespace object","webpack://pawsqlite-websql-adapter/./src/websql_adapter.mjs"],"names":[],"mappings":";;;;;;;;;;;;;;;AAA+D;;;AAGxD;AACP;AACA;AACA;AACA,4BAA4B,wEAAkB;AAC9C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,C;;;;;;;;;;;;;;;AC7BA;;AAEO;AACP;AACA;AACA,G;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;;;ACbO;AACP,oBAAoB;AACpB;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACLO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA,mBAAmB,gCAAgC;AACnD;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;;;;;;ACrBgE;AAChB;AAChB;;;AAGhC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;;AAGO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,yEAAkB;AACvC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK,oBAAoB,6DAAS;AAClC;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,6BAA6B,6DAAS;AACtC,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,4DAA4D,6DAAS;AACrE,KAAK;AACL;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,YAAY,6CAAG,iBAAiB,gBAAgB,eAAe,iBAAiB;AAChF;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,mBAAmB,yEAAkB;AACrC;AACA;AACA;AACA;AACA,gBAAgB,6DAAS;AACzB,OAAO;AACP,eAAe,8EAAuB;AACtC;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA,C;;;;;;;;;;;;;;AC3JO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;;;;;;;;;;;;;;;ACNgE;AACP;AACA;AACZ;;AAE7C;;AAEA,iEAAe;AACf;AACA;AACA;;AAEA;AACA,gCAAgC,kEAAe;AAC/C;;AAEA,WAAW,0EAAuB,EAAE,UAAU;AAC9C,GAAG;;AAEH;AACA;AACA,WAAW,0EAAuB;AAClC,GAAG;;AAEH;AACA,IAAI,6CAAG;;AAEP;AACA;AACA,gBAAgB,yEAAkB;AAClC;;AAEA;AACA,WAAW,0EAAuB;AAClC,GAAG;;AAEH;AACA,cAAc,yEAAkB;AAChC,GAAG;;AAEH,SAAS,iDAAW;AACpB,CAAC,EAAC","file":"pawsqlite-websql-adapter.js","sourcesContent":["import { TransactionManager } from \"./transaction_manager.mjs\";\n\n\nexport class DatabaseWrapper {\n constructor(dbName, version) {\n this.name = dbName;\n this.db = openDatabase(this.name, version, \"\", 5 * 1024 * 1024);\n this.transManager = new TransactionManager(this.db);\n }\n\n sql(sql, ...args) {\n const reg = /^\\s*(BEGIN|END|COMMIT|ROLLBACK)(?:[^A-Z]|$)/i;\n const match = reg.exec(sql);\n if (match) {\n const statement = match[1].toUpperCase();\n\n switch(statement) {\n case \"BEGIN\":\n return this.transManager.begin();\n case \"END\":\n case \"COMMIT\":\n return this.transManager.commit();\n case \"ROLLBACK\":\n return this.transManager.rollback();\n }\n } else {\n return this.transManager.sql(sql, args);\n }\n }\n}","let DEBUG = false;\n\nexport function log(...args) {\n if (DEBUG) {\n console.log(...args);\n } \n}\n\nexport function enableDebug(active) {\n DEBUG = !!active;\n log(\"PawSQLite-WebSQL-Adapter: debugging \" + (\n DEBUG ? \"enabled\" : \"disabled\")\n );\n}","export const ResponseWrapper = {\n success: (obj = {}) => ({\n success: true,\n ...obj\n })\n};\n\n\n","export function mapResult(originalResult) {\n const new