csvdriver

package
v0.0.0-...-27cbb86 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

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

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

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

It opens a database connection to csvdriver.

Types

type Conn

type Conn struct {
	File    string      // name of the file to be open
	Mode    int         // r/w mode (default: read-only)
	Perm    os.FileMode // file permissions
	Comma   rune        // field delimiter (default: ',')
	Comment rune        // comment character for start of line (default: '#')
}

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

func (Conn) Open

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

Open opens a database connection with the CSV driver.

Jump to

Keyboard shortcuts

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