Commit c751c86e authored by Juergen Enge's avatar Juergen Enge
Browse files


parent 5e4008a2
Pipeline #13767 passed with stages
in 3 minutes and 55 seconds
......@@ -46,7 +46,7 @@ folder = "C:/daten/go/src/
connMaxTimeout = "4h"
# query has to return the fields uri, access and protocol. One parameter
#query = "SELECT uri, access, proto AS protocol, `status` FROM mediaserver.entities WHERE sig = ?"
query = "SELECT uri, access, proto AS protocol, `status` FROM test.entities WHERE sig = ?"
query = "SELECT uri, access, proto AS protocol, `status`, mimetype FROM test.entities_metadata WHERE sig = ?"
schema = "test"
......@@ -51,9 +51,9 @@ func (rdm *ResolverDBMySQL) Close() {
func (rdm *ResolverDBMySQL) Resolve(signature string) (*MediaEntry, error) {
// use prepared statement for speed
row := rdm.preparedStmt.QueryRow(signature)
var access, protocol, uri, status string
var access, protocol, uri, status, mimetype string
// mapUri data
switch err := row.Scan(&uri, &access, &protocol, &status); err {
switch err := row.Scan(&uri, &access, &protocol, &status, &mimetype); err {
case sql.ErrNoRows: // dataset not found
return nil, emperror.Wrapf(err, "cannot find signature %s", signature)
case nil: // all fine, dataset found
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment