xk6-sql
    Preparing search index...

    Function open

    • Open a database specified by database driver identifier Symbol and a driver-specific data source name, usually consisting of at least a database name and connection information.

      Parameters

      • dirverID: Symbol

        driver identification symbol, the default export of the driver module

      • dataSourceName: String

        driver-specific data source name, like a database name

      • Optionaloptions: Options

        connection related options

      Returns Database

       import sql from "k6/x/sql";

      // the actual database driver should be used instead of ramsql
      import driver from "k6/x/sql/driver/ramsql";

      const db = sql.open(driver, "roster_db");