Skip to content
Documentation
SQL Adapter

SQL Adapter

The SQL Adapter in verse.db allows seamless interaction with your data stored in SQL files. Here's how you can set it up and use it:

Setting Up the Database:

  • First, establish a connection to your database using the versedb.connect function.

  • Specify the adapter as "sql" and provide the path to the directory containing your SQL files using the dataPath parameter.

  • Optionally, enable development logs (devLogs) and encryption (not recommended for now) using the respective settings.

  • Example configuration:

    const versedb = require("verse.db");
    const db = versedb.connect({
      adapter: "sql",
      dataPath: "./data", // Path to your SQL files
      devLogs: {
        enable: true,
        path: "./logs",
      },
      encryption: {
        enable: false,
        secret: "", // Your secret passphrase (optional)
      }
    });

Feel free to explore the power of the SQL Adapter in verse.db for efficient data management! 📂✨

Functions:


VERSE.DB. Powered by JEDI Studio.