summaryrefslogtreecommitdiffstats
path: root/scripts/settimeseriesnote.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/settimeseriesnote.py')
-rw-r--r--scripts/settimeseriesnote.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/settimeseriesnote.py b/scripts/settimeseriesnote.py
index 7e4aa5b..6d815e9 100644
--- a/scripts/settimeseriesnote.py
+++ b/scripts/settimeseriesnote.py
@@ -19,23 +19,23 @@ class SetTimeSeriesNote:
if len(self.note) == 0:
# Delete the row from the table:
- query = (
+ execQuery(
"DELETE FROM timeSeriesAnnotation"
- " WHERE hostId = %d"
- " AND platformId = %d"
- " AND branchId = %d"
- " AND benchmarkId = %d"
- " AND metricId = %d;"
- % (self.host_id, self.platform_id, self.branch_id,
- self.benchmark_id, self.metric_id))
- execQuery(query, False)
+ " WHERE hostId = %s"
+ " AND platformId = %s"
+ " AND branchId = %s"
+ " AND benchmarkId = %s"
+ " AND metricId = %s",
+ (self.host_id, self.platform_id, self.branch_id,
+ self.benchmark_id, self.metric_id),
+ False)
else:
# Insert or update table row:
- query = (
- "SELECT merge_timeSeriesNote(%d, %d, %d, %d, %d, '%s');"
- % (self.host_id, self.platform_id, self.branch_id,
- self.benchmark_id, self.metric_id, self.note))
- execQuery(query, False)
+ execQuery(
+ "SELECT merge_timeSeriesNote(%s, %s, %s, %s, %s, %s)",
+ (self.host_id, self.platform_id, self.branch_id,
+ self.benchmark_id, self.metric_id, self.note),
+ False)
# Write to database:
commit()