	var stmt = OpaquePointer(bitPattern: 0) {
		didSet {
			var tables: Set<String> = [ ]
			for column in 0..<sqlite3_column_count(stmt) {
				keys.append(String(cString: sqlite3_column_name(stmt, column)))
				tables.insert(String(cString: sqlite3_column_table_name(stmt, column)))
			}

			self.updateHook = { [weak self, tables] (type: Int32, table: String, rowid: Int64) in
				if tables.contains(table) {
					self?.reloadData()
				}
			}
		}