Skip to content

Commit d8880e4

Browse files
committed
Fixes.
1 parent 4b154a8 commit d8880e4

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

driver/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ func (r *rows) ColumnTypeScanType(index int) (typ reflect.Type) {
740740
switch {
741741
case scan == _TIME && val != _BLOB && val != _NULL:
742742
t := r.Stmt.ColumnTime(index, r.tmRead)
743-
useValType = t == time.Time{}
743+
useValType = t.IsZero()
744744
case scan == _BOOL && val == _INT:
745745
i := r.Stmt.ColumnInt64(index)
746746
useValType = i != 0 && i != 1

ext/fileio/fileio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func Register(db *sqlite3.Conn) error {
1818
return RegisterFS(db, nil)
1919
}
2020

21-
// Register registers SQL functions readfile, lsmode,
21+
// RegisterFS registers SQL functions readfile, lsmode,
2222
// and the table-valued function fsdir;
2323
// fsys will be used to read files and list directories.
2424
func RegisterFS(db *sqlite3.Conn, fsys fs.FS) error {

ext/unicode/unicode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
"github.com/ncruces/go-sqlite3/internal/util"
4444
)
4545

46-
// Set RegisterLike to false to not register a Unicode aware LIKE operator.
46+
// RegisterLike must be set to false to not register a Unicode aware LIKE operator.
4747
// Overriding the built-in LIKE operator disables the [LIKE optimization].
4848
//
4949
// [LIKE optimization]: https://sqlite.org/optoverview.html#the_like_optimization

func.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (c *Conn) CreateCollation(name string, fn CollatingFunction) error {
5959
return c.error(rc)
6060
}
6161

62-
// Collating function is the type of a collation callback.
62+
// CollatingFunction is the type of a collation callback.
6363
// Implementations must not retain a or b.
6464
type CollatingFunction func(a, b []byte) int
6565

tests/bradfitz/sql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type params struct {
3535
*sql.DB
3636
}
3737

38-
func (t params) mustExec(sql string, args ...interface{}) sql.Result {
38+
func (t params) mustExec(sql string, args ...any) sql.Result {
3939
res, err := t.DB.Exec(sql, args...)
4040
if err != nil {
4141
t.Fatalf("Error running %q: %v", sql, err)

util/ioutil/seek.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (s *SeekingReaderAt) Size() (int64, error) {
4949
return s.r.Seek(0, io.SeekEnd)
5050
}
5151

52-
// ReadAt implements [io.Closer].
52+
// Close implements [io.Closer].
5353
func (s *SeekingReaderAt) Close() error {
5454
s.l.Lock()
5555
defer s.l.Unlock()

util/osutil/osfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (FS) Open(name string) (fs.File, error) {
2323
return os.OpenFile(name, os.O_RDONLY, 0)
2424
}
2525

26-
// ReadFileFS implements [fs.StatFS].
26+
// Stat implements [fs.StatFS].
2727
func (FS) Stat(name string) (fs.FileInfo, error) {
2828
return os.Stat(name)
2929
}

value.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func (v Value) Dup() *Value {
3131
// Close frees an SQL value previously obtained by [Value.Dup].
3232
//
3333
// https://sqlite.org/c3ref/value_dup.html
34-
func (dup *Value) Close() error {
35-
dup.c.call("sqlite3_value_free", stk_t(dup.handle))
36-
dup.handle = 0
34+
func (v *Value) Close() error {
35+
v.c.call("sqlite3_value_free", stk_t(v.handle))
36+
v.handle = 0
3737
return nil
3838
}
3939

vfs/filename.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (n *Filename) Journal() string {
5656
return n.path("sqlite3_filename_journal")
5757
}
5858

59-
// Journal returns the name of the corresponding WAL file.
59+
// WAL returns the name of the corresponding WAL file.
6060
//
6161
// https://sqlite.org/c3ref/filename_database.html
6262
func (n *Filename) WAL() string {

0 commit comments

Comments
 (0)