mattn / go-sqlite3

sqlite3 driver for go using database/sql

Home Page:http://mattn.github.io/go-sqlite3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run a dot command like ".import file.csv test"?

evt opened this issue · comments

_, err = db.Exec(".import epf.csv video")
if err != nil {
    log.Fatal(err)
}

Error: near ".": syntax error

In my experience, those commands are not supported by this library. .schema will result in the same thing.

commented

it's a feature of sqlite3 command not this library. if you want, you need to implement the feature or call sqlite3 command.

exec.Command("sqlite3", "-cmd", ".import sample.csv ").CaptureOutput()