Skip to content

Commit 2e94cda

Browse files
committed
add sqlite_dbstat tag for the DBSTAT virtual table
Used to gather statistics information about table disk usage.
1 parent f76bae4 commit 2e94cda

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ go build -tags "icu json1 fts5 secure_delete"
180180
| Tracing / Debug | sqlite_trace | Activate trace functions |
181181
| User Authentication | sqlite_userauth | SQLite User Authentication see [User Authentication](#user-authentication) for more information. |
182182
| Virtual Tables | sqlite_vtable | SQLite Virtual Tables see [SQLite Official VTABLE Documentation](https://www.sqlite.org/vtab.html) for more information, and a [full example here](https://github.com/mattn/go-sqlite3/tree/master/_example/vtable) |
183+
| The DBSTAT Virtual Table | sqlite_dbstat | The DBSTAT virtual table is a read-only virtual table that returns information about the amount of disk space used to store the content of an SQLite database. See [SQLite Official Documentation](https://www.sqlite.org/dbstat.html) for more information. |
183184

184185
# Compilation
185186

sqlite3_opt_dbstat.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (C) 2025 Yasuhiro Matsumoto <[email protected]>.
2+
// Copyright (C) 2025 Jakob Borg <[email protected]>.
3+
//
4+
// Use of this source code is governed by an MIT-style
5+
// license that can be found in the LICENSE file.
6+
7+
//go:build sqlite_dbstat
8+
// +build sqlite_dbstat
9+
10+
package sqlite3
11+
12+
/*
13+
#cgo CFLAGS: -DSQLITE_ENABLE_DBSTAT_VTAB
14+
*/
15+
import "C"

0 commit comments

Comments
 (0)