Better SqlTest() function
This commit is contained in:
parent
61d6d47637
commit
e70571c450
1 changed files with 1 additions and 8 deletions
|
@ -24,15 +24,8 @@ func SqlDatabase(conf *Conf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SqlTest() {
|
func SqlTest() {
|
||||||
results, err := DB.Query("SELECT name, content FROM records")
|
_, err := DB.Query("SELECT name, content FROM records")
|
||||||
CheckErr(err)
|
CheckErr(err)
|
||||||
|
|
||||||
for results.Next() {
|
|
||||||
var record Record
|
|
||||||
err = results.Scan(&record.Fqdn, &record.Content)
|
|
||||||
CheckErr(err)
|
|
||||||
logrus.Debugf(record.Content)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func sqlCheckForRecord(redisKey string, dKey string, entry Record) (Record, int) {
|
func sqlCheckForRecord(redisKey string, dKey string, entry Record) (Record, int) {
|
||||||
|
|
Loading…
Reference in a new issue