Documentation

Overview

    Package rsqldrv registers a database/sql/driver.Driver implementation for ROOT files.

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Connector

    func Connector(file *riofs.File) driver.Connector

      Connector returns a database/sql/driver.Connector from a ROOT file.

      Connector can be used to open a database/sql.DB from an already open ROOT file.

      func Create

      func Create(name string) (*sql.DB, error)

        Create is a ROOT/SQL-driver helper function for sql.Open.

        It creates a new ROOT file, connected via the ROOT/SQL driver.

        func Open

        func Open(name string) (*sql.DB, error)

          Open is a ROOT/SQL-driver helper function for sql.Open.

          It opens a database connection to the ROOT/SQL driver.

          Example
          Output:
          
          row[0]: (1, 1.1, "uno")
          row[1]: (2, 2.2, "dos")
          row[2]: (3, 3.3, "tres")
          row[3]: (4, 4.4, "quatro")
          
          Example (Connector)
          Output:
          
          row[0]: (1, 1.1, "uno")
          row[1]: (2, 2.2, "dos")
          row[2]: (3, 3.3, "tres")
          row[3]: (4, 4.4, "quatro")
          
          Example (Tuple)
          Output:
          
          row[0]: (1, 1.1, "uno")
          row[1]: (2, 2.2, "dos")
          row[2]: (3, 3.3, "tres")
          row[3]: (4, 4.4, "quatro")
          
          Example (WhereStmt)
          Output:
          
          row[0]: (3, 3.3, "tres")
          row[1]: (4, 4.4, "quatro")
          

          func OpenDB

          func OpenDB(file *riofs.File) *sql.DB

            OpenDB opens a database/sql.DB from an already open ROOT file.

            Types

            This section is empty.