Entry tags:
Сан Хосе, статистика
12 копов было убито в Сан Хосе. С 1858-го года (Карл).
val meta = conn.createStatement().executeQuery(s"select * from $table limit 1").getMetaData
val allNames = 1 to meta.getColumnCount map (i => meta.getColumnName(i) ->(meta.getColumnType(i), meta.getColumnDisplaySize(i))) toMap
val filteredContent: TraversableOnce[String Map String] = content map (_.filterKeys(allNames.keySet.contains))
def dataHasColumn(name: String) = {
filteredContent.forall(_.contains(name))
}
val goodNames = allNames.filterKeys(dataHasColumn)
val gnset = goodNames.toSet
val nt2 = goodNames.toList // TODO(vlad): investigate this horrible bug (patient_sec is the table)
val namesAndTypes: List[(String, (Int, Int))] = gnset.toList
if (nt2.length > namesAndTypes.length) nt2 else namesAndTypes