注册加载前回调(用于清除数据)
(h func(*Table) error)
| 97 | |
| 98 | // 注册加载前回调(用于清除数据) |
| 99 | func (self *Table) RegisterPreEntry(h func(*Table) error) { |
| 100 | |
| 101 | if h == nil { |
| 102 | panic("empty preload handler") |
| 103 | } |
| 104 | |
| 105 | self.preHandlers = append(self.preHandlers, h) |
| 106 | } |
| 107 | |
| 108 | // 清除索引和数据 |
| 109 | func (self *Table) ResetData() error { |