Active Query Builder support area

AlwaysWrapInSubQuery

Avatar
  • updated
  • Completed

Hi

I have just downloaded 1.26.28 to take a look

Just quickly trying AlwaysWrapInSubQuery and it does not seem to be having an effect. (i'm probably looking in the wrong place)

Also is there a bit more documentation on these and the other new features beyoind what is in the build notes ?

Thanks

Avatar
Andrey Zavyalov, PM

Suppose that you have a query: "select * from table1" assigned to the ActiveQueryBuilderX.SQL property. All effects of the QueryTransformer property can be seen by reading the ActiveQueryBuilderX.QueryTransformer.SQL propery

Turning the AlwaysWrapInSubQuery to true you'll get the "select q.* from (select * from table1) q" in result.

Turning the AlwaysExpandColumnsInQuery you'll get the "select table1.field1, table1.field2, ... from table1" in result: asterisk items were expanded to explicit set of table columns.

Turing the RenameDuplicatedColumns property to true will lead to renaming of identical or unnamed column names. For example, having a table "table1" with the fidle name "id", the query "select table1.*, table2.id, concat('abc', 'bcd') from table1, table2" will result in getting the following query from the QueryTransformer.SQL:

"select table1.id, table1.field2, ..., table2.id as id1, concat('abc', 'bcd') as column1 from table1, table2"

The aqbxOutputColumn read-only properties OriginalName and ResultName provde information about orignal and renamed query column names, the aqbxOutputColumn.PreassignedName allows you to define custom column name.