diff --git a/json.go b/json.go index 4bc010d..724536c 100644 --- a/json.go +++ b/json.go @@ -152,17 +152,20 @@ func UpdateEntityModels(command string) (total, upd, add int, err error) { if driver == "ora" { uStmt, err = metadataDB.Prepare("update entities set entity_model = :1 where entity_type = :2") if err != nil { + logger.Trace(err.Error()) return } } else if driver == "mysql" { uStmt, err = metadataDB.Prepare("update entities set entity_model = ? where entity_type = ?") if err != nil { + logger.Trace(err.Error()) return } } for _, k := range toUpdate { _, err = uStmt.Exec(string(updateQue[k]), k) if err != nil { + logger.Trace(err.Error()) return } upd++ @@ -173,17 +176,20 @@ func UpdateEntityModels(command string) (total, upd, add int, err error) { if driver == "ora" { iStmt, err = metadataDB.Prepare("insert into entities(projekat, metadata, entity_type, entity_model) values(:1, :2, :3, :4)") if err != nil { + logger.Trace(err.Error()) return } } else if driver == "mysql" { iStmt, err = metadataDB.Prepare("insert into entities(projekat, metadata, entity_type, entity_model) values(?, ?, ?, ?)") if err != nil { + logger.Trace(err.Error()) return } } for _, k := range toAdd { _, err = iStmt.Exec(activeProject, string(blankPayload), k, string(updateQue[k])) if err != nil { + logger.Trace(err.Error()) return } metadata[k] = Payload{}