mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-06 15:12:42 +02:00
lib/rdlog_event.cpp MySQL v5.7+ date/time checks
Usual date changes and some TODOs for potentially invalid SELECT statements
This commit is contained in:
parent
69ea83d570
commit
7506d1567c
@ -244,6 +244,7 @@ int RDLogEvent::validate(QString *report,const QDate &date)
|
|||||||
//
|
//
|
||||||
// Handle events with no logged start time (e.g. manual inserts)
|
// Handle events with no logged start time (e.g. manual inserts)
|
||||||
//
|
//
|
||||||
|
//TODO do we need to verify date here?
|
||||||
sql=QString().
|
sql=QString().
|
||||||
sprintf("select CUT_NAME from CUTS where \
|
sprintf("select CUT_NAME from CUTS where \
|
||||||
(CART_NUMBER=%u)&& \
|
(CART_NUMBER=%u)&& \
|
||||||
@ -258,6 +259,7 @@ int RDLogEvent::validate(QString *report,const QDate &date)
|
|||||||
(const char *)RDDowCode(date.dayOfWeek()));
|
(const char *)RDDowCode(date.dayOfWeek()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
//TODO Do we need to verify date and logLine(i)->startTime?
|
||||||
sql=QString().
|
sql=QString().
|
||||||
sprintf("select CUT_NAME from CUTS where \
|
sprintf("select CUT_NAME from CUTS where \
|
||||||
(CART_NUMBER=%u)&& \
|
(CART_NUMBER=%u)&& \
|
||||||
@ -1203,8 +1205,8 @@ void RDLogEvent::InsertLineValues(QString *query, int line)
|
|||||||
RDEscapeString(log_line[line]->markerLabel()),
|
RDEscapeString(log_line[line]->markerLabel()),
|
||||||
log_line[line]->graceTime(),
|
log_line[line]->graceTime(),
|
||||||
log_line[line]->source(),
|
log_line[line]->source(),
|
||||||
(const char *)log_line[line]->extStartTime().
|
(const char *)RDCheckDateTime(
|
||||||
toString("hh:mm:ss"),
|
log_line[line]->extStartTime(),"hh:mm:ss"),
|
||||||
log_line[line]->extLength(),
|
log_line[line]->extLength(),
|
||||||
(const char *)RDEscapeString(log_line[line]->extData()),
|
(const char *)RDEscapeString(log_line[line]->extData()),
|
||||||
(const char *)
|
(const char *)
|
||||||
@ -1226,8 +1228,8 @@ void RDLogEvent::InsertLineValues(QString *query, int line)
|
|||||||
(const char *)RDYesNo(log_line[line]->linkEmbedded()),
|
(const char *)RDYesNo(log_line[line]->linkEmbedded()),
|
||||||
(const char *)
|
(const char *)
|
||||||
RDEscapeString(log_line[line]->originUser()),
|
RDEscapeString(log_line[line]->originUser()),
|
||||||
(const char *)log_line[line]->originDateTime().
|
(const char *)RDCheckDateTime(
|
||||||
toString("yyyy-MM-dd hh:mm:ss"),
|
log_line[line]->originDateTime(),"yyyy-MM-dd hh:mm:ss"),
|
||||||
log_line[line]->linkStartSlop(),
|
log_line[line]->linkStartSlop(),
|
||||||
log_line[line]->linkEndSlop(),
|
log_line[line]->linkEndSlop(),
|
||||||
log_line[line]->duckUpGain(),
|
log_line[line]->duckUpGain(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user