diff options
Diffstat (limited to 'pkg/datamaps/reader.go')
-rw-r--r-- | pkg/datamaps/reader.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/datamaps/reader.go b/pkg/datamaps/reader.go index ef4ef1a..050853a 100644 --- a/pkg/datamaps/reader.go +++ b/pkg/datamaps/reader.go @@ -149,6 +149,8 @@ func ReadXLSX(ssheet string) FileData { func DMLFromDB(name string, db *sql.DB) []DatamapLine { + var out []DatamapLine + query := ` select key, sheet, cellref @@ -170,9 +172,12 @@ func DMLFromDB(name string, db *sql.DB) []DatamapLine { if err := rows.Scan(&key, &sheet, &cellref); err != nil { log.Fatal(err) } - log.Printf("key %s\nsheet %s\ncellref %v", key, sheet, cellref) + + // log.Printf("key %s\nsheet %s\ncellref %v", key, sheet, cellref) + out = append(out, DatamapLine{Key: key, Sheet: sheet, Cellref: cellref}) } - return make([]DatamapLine, 0) + + return out } // func ExtractDBDM(name string, file string) ExtractedData { |