Overview
libSQL is a fork of SQLite with enhanced features for distributed, cloud-native applications. Key advantages include:
- SQLite compatibility: Works with existing SQLite applications and tools
- Distributed architecture: Built-in replication for high availability
- Edge-friendly: Deploy databases close to your users for lower latency
- WebAssembly support: Run directly in browsers and edge environments
- Enhanced security: Built-in encryption for data protection
libSQL combines SQLite’s simplicity and efficiency with modern capabilities needed for cloud and edge deployments, making it ideal for applications that need a lightweight but robust database solution.
Connecting
To connect to libSQL in DBCode:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- Complete new connection form:
- Select libSQL as the database type
- Choose local file or remote connection
- For local files: Browse to your .db file
- For remote: Enter URL and authentication token
- Connect: Click save to connect to your libSQL database.
- Start Managing Your Databases: Once connected, explore tables and execute queries.
For detailed instructions on connecting to libSQL, refer to the Connect article.
Connect Multiple Databases
Connecting to Turso as a cloud provider allows access to all hosted libSQL databases. To connect to multiple databases through Turso:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- Select Your Provider: Choose the Turso cloud provider from the list.
- Authenticate with Turso:
- Copy your authentication token from the Turso CLI or dashboard
- Paste the token into the authentication field
- Explore Your Databases: Browse all your libSQL instances in one interface.
For detailed instructions on connecting to multiple libSQL databases, refer to the Connect a Cloud Provider article.
libSQL Features in DBCode
DBCode enhances your libSQL development experience with:
- SQLite compatibility: Use familiar SQLite syntax with additional features
- Query history: Track and reuse previous queries across instances
By using libSQL with DBCode, you can leverage the simplicity of SQLite with distributed capabilities, all while working in your Visual Studio Code environment.
For more information about libSQL, check out Turso.