adem0x / txquery

Automatically exported from code.google.com/p/txquery
Other
0 stars 0 forks source link

Updated and improved Sources Of TXQuery 2012-09-07, based on r28 [Posted HERE] #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi I have uploaded I new version and updated of txquery.
this include some fixes like:

- Complete review for TWideStringField and TLargeIntField support
- Code improvements regarding field testing
- When using a TRANSFORM..PIVOT, if the trasnform has more than one aggregate 
expression:
ex:

TRANSFORM SUM(AmountPaid), COUNT(*), AVG(AMOUNTPAID) SELECT CUSTNO 
FROM ORDERS GROUP BY CUSTNO 
PIVOT FormatDateTime("yyyy", SALEDATE) IN 
(SELECT DISTINCT EXTRACT(YEAR FROM LASTINVOICEDATE) FROM
CUSTOMER ORDER BY 1);    

The query resturned fields 1998, 19981, 19982, 2001, 20111, 20012,etc
For each aggregate field, not it will return: SUM_OF_1998, COUNT_OF_1998, 
AVG_OF_1998, SUM_OF_2000, COUNT_OF_2000, AVG_OF_2000,
etc.

--Fixed issues with Calculated Fields
The only requirement is that TxQuery data fields (fkdata) must be already 
defined before query execution and the Calculated fields (fkcalculated) must be 
put at the end of the TXQuery dataset field list (after all data fields).

- Added Testing for LargeInt fields to DUnit testing Framework
- Added Testing for Calculated  fields to DUnit testing Framework
- added some new custom functions like 'Concat' and 'Concat_ws'.

I have only tested it in delphi XE, but whould run on delphi 7 or newer.

* Run the Demo app and the Testing DUnit framework to try to test issues

Have fun and regards

Original issue reported on code.google.com by fdue...@gmail.com on 7 Sep 2012 at 7:25

GoogleCodeExporter commented 9 years ago
This is file

Original comment by fdue...@gmail.com on 7 Sep 2012 at 8:12

Attachments:

GoogleCodeExporter commented 9 years ago
There was an issue when filtering the txquery, this was introduced when fixing 
calculated fields, here is the fixed unit.

Original comment by fdue...@gmail.com on 8 Sep 2012 at 4:38

Attachments: