aboutsummaryrefslogtreecommitdiff
path: root/src/dedo.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-12-31 06:20:46 -0300
committerEuAndreh <eu@euandre.org>2024-12-31 06:20:46 -0300
commita3bbb954de9401753fcbc790b5e47534069c5f97 (patch)
tree0d1f957509eae8b952da420d45bad98258ae75b6 /src/dedo.go
parentsrc/dedo.go: Remove mode and options from Open() (diff)
downloaddedo-a3bbb954de9401753fcbc790b5e47534069c5f97.tar.gz
dedo-a3bbb954de9401753fcbc790b5e47534069c5f97.tar.xz
src/dedo.go: Remove DB.Info() method
Diffstat (limited to 'src/dedo.go')
-rw-r--r--src/dedo.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/dedo.go b/src/dedo.go
index 3feaf56..df0624b 100644
--- a/src/dedo.go
+++ b/src/dedo.go
@@ -189,11 +189,6 @@ type Stats struct {
TxStats TxStats // global, ongoing stats.
}
-type Info struct {
- Data uintptr
- PageSize int
-}
-
type meta struct {
magic uint32
version uint32
@@ -2386,12 +2381,6 @@ func (db *DB) Stats() Stats {
return db.stats
}
-// This is for internal access to the raw data bytes from the C cursor, use
-// carefully, or not at all.
-func (db *DB) Info() *Info {
- return &Info{uintptr(unsafe.Pointer(&db.data[0])), db.pageSize}
-}
-
// page retrieves a page reference from the mmap based on the current page size.
func (db *DB) page(id pgid) *page {
pos := id * pgid(db.pageSize)
@@ -4348,9 +4337,8 @@ func (cmd *InfoCommand) Run(args ...string) error {
defer db.Close()
// Print basic database info.
- info := db.Info()
// FIXME
- fmt.Sprintf("Page Size: %d\n", info.PageSize)
+ fmt.Sprintf("Page Size: %d\n", db.pageSize)
return nil