csvdriver

package module
v0.0.0-...-f48b34b Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

CSV-Driver

Golang SQL database driver for CSV

In order to learn the source code of the goalng database driver , I implemented the CSV driver

Supported query

  • create table
  • insert row
  • simple query

Install

go get -u github.com/ahmczsy/csv-driver

Example

For more examples, please refer to the examples

package main

import (
  "database/sql"

  "github.com/ahmczsy/csv-driver"
)

func main() {
  conn, err := sql.Open(csvdriver.DriverName, "./test.csv")
  if err != nil {
    panic(err)
  }
  _, err = conn.Exec(`create table xxx (a varchar(255),b varchar(255),c varchar(255))`)
  if err != nil {
    panic(err)
  }
}

Documentation

Index

Constants

View Source
const DriverName = `csv`

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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