Removed unused parameters.

master
jdl 2022-07-30 04:25:12 +02:00
parent caf7ecf366
commit d90be1a6b5
3 changed files with 6 additions and 6 deletions

View File

@ -180,7 +180,7 @@ func (c *Collection[T]) loadData() {
}
}
func (c *Collection[T]) onStore(collection string, id uint64, data []byte) {
func (c *Collection[T]) onStore(id uint64, data []byte) {
item := decode[T](data)
old, ok := c.items.Get(id)
if !ok {
@ -196,7 +196,7 @@ func (c *Collection[T]) onStore(collection string, id uint64, data []byte) {
}
}
func (c *Collection[T]) onDelete(collection string, id uint64) {
func (c *Collection[T]) onDelete(id uint64) {
if item, ok := c.items.Get(id); ok {
for _, idx := range c.indices {
idx.delete(item)

View File

@ -81,14 +81,14 @@ func (db *Database) Close() {
func (db *Database) onStore(collection string, id uint64, data []byte) {
c, ok := db.collections[collection]
if ok {
c.onStore(collection, id, data)
c.onStore(id, data)
}
}
func (db *Database) onDelete(collection string, id uint64) {
c, ok := db.collections[collection]
if ok {
c.onDelete(collection, id)
c.onDelete(id)
}
}

View File

@ -23,6 +23,6 @@ type itemUniqueIndex[T any] interface {
type dbCollection interface {
loadData()
onStore(string, uint64, []byte) // For WAL following.
onDelete(string, uint64) // For WAL following.
onStore(uint64, []byte) // For WAL following.
onDelete(uint64) // For WAL following.
}