TheMathemagicians/sevenkeys/database/cachetimestamp.go

15 lines
342 B
Go
Raw Normal View History

2024-05-28 14:29:13 +00:00
package database
import "database/sql"
const CacheTypeAllCardsBulkData = "AllCardsBulkData"
func GetCacheTimestampByType(db *sql.DB, cacheType string) (string, error) {
var timestamp string
query := "SELECT Stamp FROM CacheTimestamp WHERE CacheType = ?;"
err := db.QueryRow(query, cacheType).Scan(&timestamp)
return timestamp, err
}