Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Streaming Server
Commits
c751c86e
Commit
c751c86e
authored
Sep 04, 2020
by
Juergen Enge
Browse files
back
parent
5e4008a2
Pipeline
#13767
passed with stages
in 3 minutes and 55 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
configs/memostream.toml
View file @
c751c86e
...
...
@@ -46,7 +46,7 @@ folder = "C:/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/strea
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"
[signatures]
...
...
pkg/memostream/resolverDBMySQL.go
View file @
c751c86e
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment