From 0f9ce387b9aa3788387d7305379ecd7e12b2a8ba Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Fri, 22 Mar 2024 00:21:00 +0000 Subject: [PATCH] Documentation. --- stmt.go | 8 ++++++++ util/fsutil/mode.go | 1 + 2 files changed, 9 insertions(+) diff --git a/stmt.go b/stmt.go index 9c20b30..34fdafb 100644 --- a/stmt.go +++ b/stmt.go @@ -553,6 +553,14 @@ func (s *Stmt) ColumnValue(col int) Value { } } +// Columns populates result columns into the provided slice. +// The slice must have [Stmt.ColumnCount] length. +// +// [INTEGER] columns will be retrieved as int64 values, +// [FLOAT] as float64, [NULL] as nil, +// [TEXT] as string, and [BLOB] as []byte. +// Any []byte are owned by SQLite and may be invalidated by +// subsequent calls to [Stmt] methods. func (s *Stmt) Columns(dest []any) error { defer s.c.arena.mark()() count := uint64(len(dest)) diff --git a/util/fsutil/mode.go b/util/fsutil/mode.go index c38fef5..88b1572 100644 --- a/util/fsutil/mode.go +++ b/util/fsutil/mode.go @@ -1,3 +1,4 @@ +// Package fsutil implements filesystem utility functions. package fsutil import (