hqlsource.ipp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef __HQLSOURCE_IPP_
  14. #define __HQLSOURCE_IPP_
  15. #include "hqlcfilter.hpp"
  16. IHqlExpression * convertToPhysicalTable(IHqlExpression * tableExpr, bool ensureSerialized);
  17. //---------------------------------------------------------------------------
  18. struct VirtualFieldsInfo
  19. {
  20. public:
  21. VirtualFieldsInfo()
  22. {
  23. simpleVirtualsAtEnd = true;
  24. requiresDeserialize = false;
  25. }
  26. IHqlExpression * createPhysicalRecord();
  27. void gatherVirtualFields(IHqlExpression * record, bool ignoreVirtuals, bool ensureSerialized);
  28. bool hasVirtuals() { return virtuals.ordinality() != 0; }
  29. bool hasVirtualsOrDeserialize() { return requiresDeserialize || virtuals.ordinality() != 0; }
  30. public:
  31. HqlExprArray physicalFields;
  32. HqlExprArray selects;
  33. HqlExprArray virtuals;
  34. bool simpleVirtualsAtEnd;
  35. bool requiresDeserialize;
  36. };
  37. //---------------------------------------------------------------------------
  38. unsigned getProjectCount(IHqlExpression * expr);
  39. #endif