diff options
| author | 2025-03-03 09:51:42 +0000 | |
|---|---|---|
| committer | 2025-03-03 09:51:42 +0000 | |
| commit | 0e2e8e54ab85889d3c42cf8b0744c3253065983b (patch) | |
| tree | cd56b8adc1745707063cda5e9d34af8e32d40360 /vendor/github.com/ncruces/go-sqlite3/conn.go | |
| parent | [chore] migrate oauth2 -> codeberg (#3857) (diff) | |
| download | gotosocial-0e2e8e54ab85889d3c42cf8b0744c3253065983b.tar.xz | |
[chore]: Bump github.com/ncruces/go-sqlite3 from 0.23.0 to 0.24.0 (#3862)
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.23.0...v0.24.0)
---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/conn.go')
| -rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/conn.go | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/conn.go b/vendor/github.com/ncruces/go-sqlite3/conn.go index fffc7416a..9f9251e9f 100644 --- a/vendor/github.com/ncruces/go-sqlite3/conn.go +++ b/vendor/github.com/ncruces/go-sqlite3/conn.go @@ -3,6 +3,7 @@ package sqlite3 import ( "context" "fmt" + "iter" "math" "math/rand" "net/url" @@ -492,9 +493,9 @@ func (c *Conn) TableColumnMetadata(schema, table, column string) (declType, coll if ptr := util.Read32[ptr_t](c.mod, collSeqPtr); ptr != 0 { collSeq = util.ReadString(c.mod, ptr, _MAX_NAME) } - notNull = util.Read32[uint32](c.mod, notNullPtr) != 0 - autoInc = util.Read32[uint32](c.mod, autoIncPtr) != 0 - primaryKey = util.Read32[uint32](c.mod, primaryKeyPtr) != 0 + notNull = util.ReadBool(c.mod, notNullPtr) + autoInc = util.ReadBool(c.mod, autoIncPtr) + primaryKey = util.ReadBool(c.mod, primaryKeyPtr) } return } @@ -503,10 +504,16 @@ func (c *Conn) error(rc res_t, sql ...string) error { return c.sqlite.error(rc, c.handle, sql...) } -func (c *Conn) stmtsIter(yield func(*Stmt) bool) { - for _, s := range c.stmts { - if !yield(s) { - break +// Stmts returns an iterator for the prepared statements +// associated with the database connection. +// +// https://sqlite.org/c3ref/next_stmt.html +func (c *Conn) Stmts() iter.Seq[*Stmt] { + return func(yield func(*Stmt) bool) { + for _, s := range c.stmts { + if !yield(s) { + break + } } } } |
