mirror of
				https://github.com/ElvishArtisan/rivendell.git
				synced 2025-10-31 22:24:02 +01:00 
			
		
		
		
	Scheduler optimization
This commit is contained in:
		| @@ -18011,3 +18011,5 @@ | ||||
| 	* Added a 'CART_SCHED_CODES' table to the database. | ||||
| 	* Removed 'SCHED_CODES' field from 'CART' | ||||
| 	* Incremented the database version to 299. | ||||
| 2018-11-13 Patrick Linstruth <patrick@deltecent.com> | ||||
| 	* Scheduler optimization | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| // 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> | ||||
| // | ||||
|   | ||||
| @@ -594,8 +594,11 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname, | ||||
|      | ||||
|     sql=QString("select ")+ | ||||
|       "NUMBER,"+ | ||||
|       "ARTIST "+ | ||||
|       "from CART where "+ | ||||
|       "ARTIST, "+ | ||||
|       "SCHED_CODE "+ | ||||
|       "from CART "+ | ||||
|       "left join CART_SCHED_CODES on CART.NUMBER=CART_SCHED_CODES.CART_NUMBER "+ | ||||
|       "where "+ | ||||
|       "GROUP_NAME=\""+RDEscapeString(SchedGroup())+"\""; | ||||
|     q=new RDSqlQuery(sql); | ||||
|     if(q->size()>0) | ||||
| @@ -612,13 +615,14 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname, | ||||
|       int querysize=(int)q->size(); | ||||
|       SchedCartList *schedCL; | ||||
|       schedCL=new SchedCartList(querysize); | ||||
|        | ||||
|  | ||||
|       QString schedcode;  | ||||
|       for(counter=0;counter<querysize;counter++) | ||||
|       { | ||||
| 	q->seek(counter); | ||||
|         RDCart *cart=new RDCart(q->value(0).toUInt()); | ||||
| 	schedCL->insertItem(q->value(0).toUInt(),0,0,q->value(1).toString(),cart->schedCodes()); | ||||
|         delete cart; | ||||
| 	schedcode=q->value(2).toString()+"          "; | ||||
| 	schedcode=schedcode.left(11); | ||||
| 	schedCL->insertItem(q->value(0).toUInt(),0,0,q->value(1).toString(),schedcode); | ||||
|       } | ||||
|       delete q; | ||||
|        | ||||
|   | ||||
		Reference in New Issue
	
	Block a user