Close closes a db connection
()
| 108 | |
| 109 | // Close closes a db connection |
| 110 | func (d *DB) Close() error { |
| 111 | if db, ok := d.Conn.(closer); ok { |
| 112 | return db.Close() |
| 113 | } |
| 114 | |
| 115 | return errors.New("can't close db") |
| 116 | } |
| 117 | |
| 118 | // Open initializes a new connection to the sqlite database |
| 119 | func Open(dbPath string) (*DB, error) { |