MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Close

Method Close

internal/iplibrary/ip_list_sqlite.go:291–313  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289}
290
291func (this *SQLiteIPList) Close() error {
292 this.isClosed = true
293
294 if this.db != nil {
295 for _, stmt := range []*dbs.Stmt{
296 this.deleteExpiredItemsStmt,
297 this.deleteItemStmt,
298 this.insertItemStmt,
299 this.selectItemsStmt,
300 this.selectMaxItemVersionStmt, // ipItems table
301
302 this.selectVersionStmt, // versions table
303 this.updateVersionStmt,
304 } {
305 if stmt != nil {
306 _ = stmt.Close()
307 }
308 }
309
310 return this.db.Close()
311 }
312 return nil
313}

Callers 5

TestSQLiteIPList_AddItemFunction · 0.95
initMethod · 0.95

Calls 1

CloseMethod · 0.65