Skip to content

Fix #49: Addition of purge API#50

Closed
itniuma2026 wants to merge 1 commit intotidesdb:masterfrom
itniuma2026:fix/issue-49
Closed

Fix #49: Addition of purge API#50
itniuma2026 wants to merge 1 commit intotidesdb:masterfrom
itniuma2026:fix/issue-49

Conversation

@itniuma2026
Copy link

Summary

Add Go bindings for the new TidesDB v8.7.0 purge API methods: purge database and purge column family.

Approach

Add two new methods to the TidesDB Go binding: (1) Purge() which calls the C function tidesdb_purge_db to purge all in-memory queues and buffers for the entire database, and (2) PurgeColumnFamily(name string) which calls tidesdb_purge_column_family to purge in-memory queues and buffers for a specific column family. Both methods should follow the existing pattern in tidesdb.go of calling the underlying C API via cgo, checking the returned error, and wrapping it in a Go error. Tests should be added in tidesdb_test.go to verify both purge methods work correctly.

Files Changed

  • tidesdb.go
  • tidesdb_test.go

Related Issue

Fixes #49

Testing

No tests were added with this change. Happy to add them if needed.

Add Go bindings for the new TidesDB v8.7.0 purge API methods: purge database and purge column family.

Fixes tidesdb#49
@guycipher
Copy link
Member

@itniuma2026 review the DCO. Thank you for PR

@guycipher
Copy link
Member

@itniuma2026 close but you need to review the C documentation. Look at the method names and parameters and line them up properly with tests to prove you've done it well.

@guycipher
Copy link
Member

@guycipher guycipher closed this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Addition of purge API

2 participants