hep: go-hep.org/x/hep/csvutil/csvdriver Index | Files

package csvdriver

import "go-hep.org/x/hep/csvutil/csvdriver"

package csvdriver registers a database/sql/driver.Driver implementation for CSV files.

Index

Package Files

driver.go import.go

func Create Uses

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

Create is a CSV-driver helper function for sql.Open.

It creates a new CSV file, connected via the csvdriver.

func Open Uses

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

Open is a CSV-driver helper function for sql.Open.

It opens a database connection to csvdriver.

type Conn Uses

type Conn struct {
    File    string      `json:"file"`    // name of the file to be open
    Mode    int         `json:"mode"`    // r/w mode (default: read-only)
    Perm    os.FileMode `json:"perm"`    // file permissions
    Comma   rune        `json:"comma"`   // field delimiter (default: ',')
    Comment rune        `json:"comment"` // comment character for start of line (default: '#')
    Header  bool        `json:"header"`  // whether the CSV-file has a column header
    Names   []string    `json:"names"`   // column names
}

Conn describes how a connection to the CSV-driver should be established.

func (Conn) Open Uses

func (c Conn) Open() (*sql.DB, error)

Open opens a database connection with the CSV driver.

Package csvdriver imports 14 packages (graph) and is imported by 1 packages. Updated 2019-05-31. Refresh now. Tools for package owners.