FAQ
Frequently asked questions about Evolu.
Questions
- What is the SQLite database size limit?
- How can I check the current database filesize?
- How to delete OPFS Sqlite in browser?
- How do I integrate with external systems that have their own IDs?
What is the SQLite database size limit?
The size limit depends on the storage quotas and eviction criteria of the browser or platform in use. For detailed information, refer to the Storage quotas and eviction criteria documentation.
How can I check the current database filesize?
Use exportDatabase
method on Evolu instance.
const database = await evolu.exportDatabase();
const sizeInBytes = database.length;
console.log(`Database size: ${sizeInBytes} bytes`);
How to delete OPFS Sqlite in browser?
To clear the OPFS (Origin Private File System) SQLite database:
- Install the OPFS Explorer Chrome DevTools extension
- Disable JavaScript in your browser
- Reload the page
- Open DevTools and navigate to the OPFS Explorer tab
- Remove the SQLite database file
- Re-enable JavaScript
- Reload the page
How do I integrate with external systems that have their own IDs?
Use createIdFromString
to convert external IDs into valid Evolu IDs:
import { createIdFromString } from "@evolu/common";
// Convert external API ID to Evolu ID
const evoluId = createIdFromString("user-api-123");
upsert("todo", {
id: evoluId,
title: "Task from external system",
});
// With table branding for type safety
const todoId = createIdFromString<"Todo">("external-todo-456");
This ensures that multiple clients creating records with the same external identifier will generate the same Evolu ID.
Important: This transformation is one-way. If you need to preserve the original external ID, store it in a separate column.