()
| 190 | } |
| 191 | |
| 192 | func (this *SQLiteFileListDB) Total() (int64, error) { |
| 193 | // 读取总数量 |
| 194 | var row = this.readDB.QueryRow(`SELECT COUNT(*) FROM "` + this.itemsTableName + `"`) |
| 195 | if row.Err() != nil { |
| 196 | return 0, row.Err() |
| 197 | } |
| 198 | var total int64 |
| 199 | err := row.Scan(&total) |
| 200 | return total, err |
| 201 | } |
| 202 | |
| 203 | func (this *SQLiteFileListDB) AddSync(hash string, item *Item) error { |
| 204 | this.hashMap.Add(hash) |