mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
Scheduler optimization
This commit is contained in:
@@ -18011,3 +18011,5 @@
|
|||||||
* Added a 'CART_SCHED_CODES' table to the database.
|
* Added a 'CART_SCHED_CODES' table to the database.
|
||||||
* Removed 'SCHED_CODES' field from 'CART'
|
* Removed 'SCHED_CODES' field from 'CART'
|
||||||
* Incremented the database version to 299.
|
* Incremented the database version to 299.
|
||||||
|
2018-11-13 Patrick Linstruth <patrick@deltecent.com>
|
||||||
|
* Scheduler optimization
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// rdcart_search_text.cpp
|
// rdcart_search_text.cpp
|
||||||
//
|
//
|
||||||
// Generates a standardized SQL 'WHERE' clause for filtering Rivendell carts.
|
// Generates a standardized SQL 'INNER JOIN' and 'WHERE' clause for
|
||||||
|
// filtering Rivendell carts.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -594,8 +594,11 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
|||||||
|
|
||||||
sql=QString("select ")+
|
sql=QString("select ")+
|
||||||
"NUMBER,"+
|
"NUMBER,"+
|
||||||
"ARTIST "+
|
"ARTIST, "+
|
||||||
"from CART where "+
|
"SCHED_CODE "+
|
||||||
|
"from CART "+
|
||||||
|
"left join CART_SCHED_CODES on CART.NUMBER=CART_SCHED_CODES.CART_NUMBER "+
|
||||||
|
"where "+
|
||||||
"GROUP_NAME=\""+RDEscapeString(SchedGroup())+"\"";
|
"GROUP_NAME=\""+RDEscapeString(SchedGroup())+"\"";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->size()>0)
|
if(q->size()>0)
|
||||||
@@ -613,12 +616,13 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
|||||||
SchedCartList *schedCL;
|
SchedCartList *schedCL;
|
||||||
schedCL=new SchedCartList(querysize);
|
schedCL=new SchedCartList(querysize);
|
||||||
|
|
||||||
|
QString schedcode;
|
||||||
for(counter=0;counter<querysize;counter++)
|
for(counter=0;counter<querysize;counter++)
|
||||||
{
|
{
|
||||||
q->seek(counter);
|
q->seek(counter);
|
||||||
RDCart *cart=new RDCart(q->value(0).toUInt());
|
schedcode=q->value(2).toString()+" ";
|
||||||
schedCL->insertItem(q->value(0).toUInt(),0,0,q->value(1).toString(),cart->schedCodes());
|
schedcode=schedcode.left(11);
|
||||||
delete cart;
|
schedCL->insertItem(q->value(0).toUInt(),0,0,q->value(1).toString(),schedcode);
|
||||||
}
|
}
|
||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user