Home | History | Annotate | Download | only in sqlite3

Lines Matching refs:DB_NAME

1 ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node}),createPreloadedFile:(function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn){Browser.init();var fullname=name?PATH.resolve(PATH.join2(parent,name)):parent;function processData(byteArray){function finish(byteArray){if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency("cp "+fullname)}var handled=false;Module["preloadPlugins"].forEach((function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,(function(){if(onerror)onerror();removeRunDependency("cp "+fullname)}));handled=true}}));if(!handled)finish(byteArray)}addRunDependency("cp "+fullname);if(typeof url=="string"){Browser.asyncLoad(url,(function(byteArray){processData(byteArray)}),onerror)}else{processData(url)}}),indexedDB:(function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB}),DB_NAME:(function(){return"EM_FS_"+window.location.pathname}),DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(function(paths,onload,onerror){onload=onload||(function(){});onerror=onerror||(function(){});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){console.log("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach((function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}}));transaction.onerror=onerror};openRequest.onerror=onerror}),loadFilesFromDB:(function(paths,onload,onerror){onload=onload||(function(){});onerror=onerror||(function(){});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAMEii":invoke_iiiiiiiii,"invoke_iiiii":invoke_iiiii,"invoke_viiii":invoke_viiii,"invoke_iii":invoke_iii,"invoke_iiid":invoke_iiid,"invoke_iiiiii":invoke_iiiiii,"_dlerror":_dlerror,"_utimes":_utimes,"_getuid":_getuid,"_send":_send,"_dlsym":_dlsym,"_mknod":_mknod,"_chown":_chown,"_lseek":_lseek,"_emscripten_set_main_loop_timing":_emscripten_set_main_loop_timing,"_access":_access,"_fstat":_fstat,"_chmod":_chmod,"_rmdir":_rmdir,"___assert_fail":___assert_fail,"_usleep":_usleep,"___buildEnvironment":___buildEnvironment,"_fflush":_fflush,"_pwrite":_pwrite,"_strerror_r":_strerror_r,"_localtime_r":_localtime_r,"_tzset":_tzset,"_open":_open,"_getpid":_getpid,"_sbrk":_sbrk,"_fcntl":_fcntl,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_unlink":_unlink,"_sysconf":_sysconf,"_fchmod":_fchmod,"___setErrNo":___setErrNo,"_ftruncate":_ftruncate,"_mkdir":_mkdir,"_pread":_pread,"_mkport":_mkport,"_dlopen":_dlopen,"_dlclose":_dlclose,"_write":_write,"_fsync":_fsync,"___errno_location":___errno_location,"_stat":_stat,"_recv":_recv,"_geteuid":_geteuid,"_getenv":_getenv,"_sleep":_sleep,"_emscripten_set_main_loop":_emscripten_set_main_loop,"_abort":_abort,"_time":_time,"_fchown":_fchown,"_strerror":_strerror,"_gettimeofday":_gettimeofday,"_munmap":_munmap,"_mmap":_mmap,"_localtime":_localtime,"_getcwd":_getcwd,"_close":_close,"_read":_read,"_truncate":_truncate,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"cttz_i8":cttz_i8};// EMSCRIPTEN_START_ASM