outputRow takes a row with its metadata as well as the table metadata, and spits out one or more RDF entries to the dumpMeta's dataWriter. Consider the following table "salary" person_company varchar (50) person_employee_id int salary float foreign key (person_company, person_employee_id) references
(row *sqlRow, tableInfo *sqlTable)
| 194 | // _:person_company_Google_employee_id_100 to the foreign blank node _:person_2 |
| 195 | // is recorded through the person table's valuesRecorder. |
| 196 | func (m *dumpMeta) outputRow(row *sqlRow, tableInfo *sqlTable) { |
| 197 | for i, colValue := range row.values { |
| 198 | colName := tableInfo.columnNames[i] |
| 199 | if !tableInfo.isForeignKey[colName] { |
| 200 | predicate := tableInfo.predNames[i] |
| 201 | m.outputPlainCell(row.blankNodeLabel, predicate, tableInfo.columnDataTypes[i], colValue) |
| 202 | } |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | func (m *dumpMeta) outputConstraints(row *sqlRow, tableInfo *sqlTable) { |
| 207 | for _, constraint := range tableInfo.foreignKeyConstraints { |
no test coverage detected