driver

package
v0.0.0-...-82fa9ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2016 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package driver provides a driver for database/sql.

Example:

package main

import (
   "database/sql"
   _ "github.com/silvasur/go-odbc/odbc/driver"
   "fmt"
)

func main() {
   db, err := sql.Open("odbc", "DSN=test;")
   defer db.Close()

   stmt, err :=	db.Prepare("select name from table")
   defer stmt.Close()

   rows, err :=	stmt.Query()
   defer rows.Close()

   for rows.Next() {
       var name string

       _ = rows.Scan(&name)
       fmt.Println(name)
   }
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
}

func (*Driver) Close

func (d *Driver) Close() error

func (*Driver) Open

func (d *Driver) Open(dsn string) (driver.Conn, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL