1
0
Fork 0

Added some more comments.

This commit is contained in:
Alexander Andreev 2023-05-22 02:37:37 +04:00
parent 16e5ececf5
commit 8c8c1f2617
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 3 additions and 0 deletions

View File

@ -95,10 +95,13 @@ func initSQLiteStatements(db *sql.DB) error {
return nil
}
// SQLiteDatabase implements a Guestbook that works with a SQLite DB
// under the hood.
type SQLiteDatabase struct {
db *sql.DB
}
// NewSQLiteDB returns an instance of a SQLite Guestbook implementation.
func NewSQLiteDB(filePath string) (Guestbook, error) {
db, err := sql.Open("sqlite3", sqliteDSN(filePath))
if err != nil {