---
# System prepended metadata

title: 'DB struct {'

---


type ProstgresqlDB struct {
}


func (db) run () {
    go func() {
        queryArray := []queries
        newQUERY <- db.writechan
        queryArray.append(newQuery)
        if len(queries) > limt {
            db.flushQueries(queryArray)
        }
    }
}

func (db) flushQueries(queryArray){
    db.pgxPool.Exec()
}


fucn (DB) UpsertEnr(enr) {
    db.writechan <- db.updateEnr(c)

}

func (c crawler) run() {
    newEnr <- chan
    c.db.UpserEnr(enr)
    hostInfo := c.connect()
    c.db.UpsertHostInfo(hostInfo)
}


fucn (DB) UpsertHostInfo(hostInfo) {
    if hostInfo.ConnAttemtp = succ {
        db.writeChan <- db.updateHostHandshakeDetails(hostInfo)
    }
    db.writeChan <- db.updateConnAttemptDetails(hostInfo)
}

func (c crawler) runDiscv4() {
    newEnr <- chan
    c.db.UpserEnr(enr)
}

