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
postprocessing
Media Metadata Indexer
Commits
9b6cd736
Unverified
Commit
9b6cd736
authored
Oct 23, 2020
by
Sebastian Schüpbach
Browse files
fix sql statement
Signed-off-by:
Sebastian Schüpbach
<
sebastian.schuepbach@unibas.ch
>
parent
f1f85da4
Pipeline
#15999
passed with stages
in 4 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mediametadatatodb_app/resources/MediametadataToDB.py
View file @
9b6cd736
...
...
@@ -94,7 +94,7 @@ def _create_sql_stmt(table_name, record, fields):
db_fields
=
','
.
join
(
db_fields
)
db_values
=
','
.
join
([
str
(
db_value
)
if
isinstance
(
db_value
,
numbers
.
Number
)
else
'"{}"'
.
format
(
db_value
)
else
"'{}'"
.
format
(
db_value
)
for
db_value
in
db_values
])
return
'INSERT IGNORE INTO {} ({}) VALUES ({})'
.
format
(
table_name
,
db_fields
,
db_values
)
...
...
@@ -103,6 +103,7 @@ def _create_sql_stmt(table_name, record, fields):
def
_create_entities_entry
(
record
,
mariadbCursor
):
fields
=
[
'sig'
,
'uri'
]
sqlStmt
=
_create_sql_stmt
(
'entities_me'
,
record
,
fields
)
logging
.
warning
(
sqlStmt
)
mariadbCursor
.
execute
(
sqlStmt
)
...
...
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