Comments (3)
A side note to my question above.
I might be tempted to use sqlocal with the socket runtime (see here: https://github.com/socketsupply/socket/).
With the socket runtime, the app would be a native app (it uses the native webview not the browser) and hence the storage space it uses will not be subject to be reclaimed by the operating system (think in the context of a mobile browser that uses storage such as IndexedDB or OPFS).
All of that is to say, the database "managed" by sqlocal can grow and have real durability quarantees. For such scenario, knowing how large of a DB sqlocal can effectively handle becomes very important to test/know
from sqlocal.
SQLite can handle databases of enormous sizes (many, many terabytes), and SQLocal does nothing that would limit this. The only thing really limiting the size of the database is the limits imposed on the Origin Private File System API by the browser. These limits vary between browsers, but if your app requests persistent storage, you should be able to store a database around 50% of the size of the client device's disk size, and the browser will not delete it. MDN has a good write-up about how this works. I recommend reading it: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria
In practice, you should not have to worry about being constrained by the limit. The limits are much higher than you should need for pretty much any use case. The only case you really need to handle is checking that the user's disk is not nearing capacity. You can use the Storage API for this.
With the socket runtime, the app would be a native app (it uses the native webview not the browser) and hence the storage space it uses will not be subject to be reclaimed by the operating system
As far as I know, this and frameworks like it (Capacitor, Tauri) share the same behaviors as the operating system's default browser (Edge on Windows, Safari on macOS/iOS, Chrome on Android). They create native apps that wrap a browser instance. So you should expect the Storage API for these apps to work the same as the default browser.
from sqlocal.
Thank you for the reply.
(Capacitor, Tauri) share the same behaviors as the operating system's default browser
That was my understanding but I ve been told otherwise. Not sure 100% as I did not find clear information though!
Anyone tested SQLocale on big data. 100 MB and up to 1 GB?
from sqlocal.
Related Issues (20)
- Cannot find module 'sqlocal/drizzle' or its corresponding type declarations.ts(2307) HOT 15
- sqlocal easy connect/disconnect HOT 4
- Node support HOT 6
- Unable to parameterize table/column name in query HOT 1
- Feature: Transaction HOT 3
- Replace Sqlite3 with Libsql HOT 1
- sqlite3 result code 10: disk I/O error HOT 8
- Feature request: ability to control instantiation of sqlite db HOT 3
- Error during SvelteKit Server-side Rendering HOT 1
- Error opening WAL db with overwriteDatabaseFile HOT 5
- Using nested literals to construct queries passed to SQLocal.sql HOT 1
- IndexedDB as a persistence option? HOT 2
- Sqlocal with pglite HOT 1
- Binding in multiple statements within a query HOT 4
- ERR_MODULE_NOT_FOUND when compiling for Node.js HOT 4
- How do you debug or visualize the database? HOT 2
- Concurrent reads and writes HOT 6
- How to handle adding new tables to the database when using drizzle?
- no such function: REGEXP HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlocal.