Close would flush the cache and release resources
()
| 141 | |
| 142 | // Close would flush the cache and release resources |
| 143 | func (c *BatchSave) Close() errors.Error { |
| 144 | c.mutex.Lock() |
| 145 | defer c.mutex.Unlock() |
| 146 | if c.current > 0 { |
| 147 | return c.flushWithoutLocking() |
| 148 | } |
| 149 | return nil |
| 150 | } |
| 151 | |
| 152 | func getKeyValue(iface interface{}, primaryKey []reflect.StructField) string { |
| 153 | var ss []string |
no test coverage detected