// CodeGear C++Builder
// Copyright (c) 1995, 2021 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ABSExpressions.pas' rev: 35.00 (Windows)

#ifndef AbsexpressionsHPP
#define AbsexpressionsHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include <Data.DB.hpp>
#include <System.Variants.hpp>
#include <System.DateUtils.hpp>
#include <ABSBase.hpp>
#include <ABSVariant.hpp>
#include <ABSLexer.hpp>
#include <ABSExcept.hpp>
#include <ABSConst.hpp>
#include <ABSTypes.hpp>
#include <ABSConverts.hpp>
#include <ABSRelationalAlgebra.hpp>
#include <ABSDateFormat.hpp>

//-- user supplied -----------------------------------------------------------

namespace Absexpressions
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TABSExpression;
class DELPHICLASS TABSExprNode;
class DELPHICLASS TABSExprNodeConst;
class DELPHICLASS TABSExprNodeField;
class DELPHICLASS TABSExprNodeComparison;
class DELPHICLASS TABSExprNodeBoolean;
class DELPHICLASS TABSExprNodeArithmetic;
class DELPHICLASS TABSExprNodeAggregated;
class DELPHICLASS TABSExprNodeCast;
class DELPHICLASS TABSExprNodeCase;
class DELPHICLASS TABSExprNodeBlob;
class DELPHICLASS TABSExprNodeStringFunction;
class DELPHICLASS TABSExprNodeSystem;
class DELPHICLASS TABSExprNodeDateFunction;
class DELPHICLASS TABSExprNodeSubquery;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TABSExprNodeType : unsigned char { entField, entConst, entOperator, entSet, entNull };

enum DECLSPEC_DENUM TSign : unsigned char { sgnUndefined, sgnPlus, sgnMinus };

enum DECLSPEC_DENUM TABSQuantifier : unsigned char { qUNDEFINED, qALL, qANY };

typedef System::DynamicArray<TABSExprNode*> TABSExprNodeArray;

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExpression : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	Abslexer::TABSLexer* LLex;
	Abslexer::TToken Token;
	Absbase::TABSCursor* LCursor;
	Data::Db::TDataSet* LDataset;
	TABSExprNode* FRootExprNode;
	bool FCaseInsensitive;
	bool FPartialKey;
	bool F3ValueLogic;
	bool FInMemory;
	System::UnicodeString FDatabaseName;
	System::UnicodeString FSessionName;
	bool __fastcall GetCurrentToken();
	bool __fastcall GetNextToken()/* overload */;
	bool __fastcall GetNextToken(Abslexer::TTokenTypes PermittedTypes, bool RaiseExceptions = false)/* overload */;
	void __fastcall SaveState(int &SavedTokenNo);
	void __fastcall RestoreState(int SavedTokenNo);
	Abstypes::TABSDataOperator __fastcall ParseCompOp();
	TABSQuantifier __fastcall ParseQuantifier();
	TABSExprNode* __fastcall ParseRowValueConstructorElement();
	TABSExprNode* __fastcall ParseRowSubquery(bool MustHaveOneRow, bool MustHaveOneField = true);
	TABSExprNode* __fastcall ParseRowValueConstructor();
	TABSExprNode* __fastcall ParseQuantifiedComparisonPredicate();
	TABSExprNode* __fastcall ParseComparisonPredicate();
	TABSExprNode* __fastcall ParseLikePredicate();
	TABSExprNode* __fastcall ParseNullPredicate();
	TABSExprNode* __fastcall ParseBetweenPredicate();
	TABSExprNode* __fastcall ParseInPredicate();
	TABSExprNode* __fastcall ParseExistsPredicate();
	TABSExprNode* __fastcall ParseTrueFalseConst();
	TABSExprNode* __fastcall ParseNullConst();
	TABSExprNode* __fastcall ParsePredicate();
	TABSExprNode* __fastcall ParseBooleanPrimary();
	TABSExprNode* __fastcall ParseBooleanTest();
	TABSExprNode* __fastcall ParseBooleanFactor();
	TABSExprNode* __fastcall ParseBooleanTerm();
	TABSExprNode* __fastcall ParseSearchCondition();
	TABSExprNode* __fastcall ParseValueExpression();
	TABSExprNode* __fastcall ParseNumericValueExpression();
	TABSExprNode* __fastcall ParseTerm();
	TABSExprNode* __fastcall ParseFactor();
	TSign __fastcall ParseSign();
	TABSExprNode* __fastcall ParseNumericPrimary();
	TABSExprNode* __fastcall ParseValueExpressionPrimary();
	TABSExprNode* __fastcall ParseUnsignedValueSpecification();
	TABSExprNode* __fastcall ParseUnsignedLiteral();
	TABSExprNode* __fastcall ParseUnsignedNumericLiteral();
	TABSExprNode* __fastcall ParseColumnReference();
	TABSExprNode* __fastcall ParseSetFunctionSpecification();
	TABSExprNode* __fastcall ParseGeneralSetFunction();
	TABSExprNode* __fastcall ParseCastSpecification();
	TABSExprNode* __fastcall ParseCastOperand();
	TABSExprNode* __fastcall ParseNumericValueFunction();
	TABSExprNode* __fastcall ParsePositionExpression();
	TABSExprNode* __fastcall ParseExtractExpression();
	TABSExprNode* __fastcall ParseLengthExpression();
	TABSExprNode* __fastcall ParseLastAutoIncExpression();
	TABSExprNode* __fastcall ParseRowNumExpression();
	TABSExprNode* __fastcall ParseSingleArgMathExpression(Absconst::TReservedWord rw, Abstypes::TABSDataOperator op, System::UnicodeString OpText);
	TABSExprNode* __fastcall ParseABSExpression();
	TABSExprNode* __fastcall ParseACOSExpression();
	TABSExprNode* __fastcall ParseASINExpression();
	TABSExprNode* __fastcall ParseATANExpression();
	TABSExprNode* __fastcall ParseCEILExpression();
	TABSExprNode* __fastcall ParseCOSExpression();
	TABSExprNode* __fastcall ParseEXPExpression();
	TABSExprNode* __fastcall ParseFLOORExpression();
	TABSExprNode* __fastcall ParseLOGExpression();
	TABSExprNode* __fastcall ParsePOWERExpression();
	TABSExprNode* __fastcall ParseRANDExpression();
	TABSExprNode* __fastcall ParseROUNDExpression();
	TABSExprNode* __fastcall ParseSIGNExpression();
	TABSExprNode* __fastcall ParseSINExpression();
	TABSExprNode* __fastcall ParseSQRExpression();
	TABSExprNode* __fastcall ParseSQRTExpression();
	TABSExprNode* __fastcall ParseMathExpression();
	TABSExprNode* __fastcall ParseStringValueExpression();
	TABSExprNode* __fastcall ParseCharacterValueExpression();
	TABSExprNode* __fastcall ParseConcatination();
	TABSExprNode* __fastcall ParseCharacterFactor();
	TABSExprNode* __fastcall ParseCharacterPrimary();
	TABSExprNode* __fastcall ParseGeneralLiteral();
	TABSExprNode* __fastcall ParseCharacterStringLiteral();
	TABSExprNode* __fastcall ParseDateTimeLiteral();
	TABSExprNode* __fastcall ParseDateLiteral();
	TABSExprNode* __fastcall ParseDateString();
	TABSExprNode* __fastcall ParseTimeLiteral();
	TABSExprNode* __fastcall ParseTimeString();
	TABSExprNode* __fastcall ParseTimeStampLiteral();
	TABSExprNode* __fastcall ParseTimeStampString();
	TABSExprNode* __fastcall ParseStringValueFunction();
	TABSExprNode* __fastcall ParseCharacterValueFunction();
	TABSExprNode* __fastcall ParseDatetimeValueExpression();
	TABSExprNode* __fastcall ParseSysdateFunction();
	TABSExprNode* __fastcall ParseCurrentTimeFunction();
	TABSExprNode* __fastcall ParseCurrentDateFunction();
	TABSExprNode* __fastcall ParseToDateFunction();
	TABSExprNode* __fastcall ParseIntervalValueExpression();
	TABSExprNode* __fastcall ParseCaseExpression();
	TABSExprNode* __fastcall ParseCaseAbbreviation();
	TABSExprNode* __fastcall ParseCoalesce();
	TABSExprNode* __fastcall ParseCaseSpecification();
	TABSExprNode* __fastcall ParseSimpleCase();
	TABSExprNode* __fastcall ParseSearchedCase();
	TABSExprNode* __fastcall ParseBlobExpression();
	TABSExprNode* __fastcall ParseMimeToBinFunction();
	void __fastcall Clear();
	
public:
	__fastcall TABSExpression()/* overload */;
	__fastcall TABSExpression(TABSExprNode* RootNode)/* overload */;
	__fastcall virtual ~TABSExpression();
	void __fastcall ParseForLocate(Absbase::TABSCursor* Cursor, System::UnicodeString FieldNames, const System::Variant &KeyValues, bool CaseInsensitive = true, bool PartialKey = false);
	void __fastcall ParseForFilter(Absbase::TABSCursor* Cursor, System::UnicodeString Filter, bool CaseInsensitive = true, bool PartialKey = false);
	void __fastcall ParseForIsAnyRecordMatchCondition(Absbase::TABSCursor* Cursor, const System::UnicodeString FieldName, const Abstypes::TABSDataOperator Operator, Absvariant::TABSVariant* const Value);
	void __fastcall ParseForBooleanExpression(Data::Db::TDataSet* Dataset, Abslexer::TABSLexer* Lexer);
	void __fastcall ParseForValueExpression(Data::Db::TDataSet* Dataset, Abslexer::TABSLexer* Lexer);
	bool __fastcall ParseForDefaultValueExpression(System::UnicodeString DefaultValue);
	void __fastcall ParseForRowSubqueryExpression(Data::Db::TDataSet* Dataset, Abslexer::TABSLexer* Lexer);
	Absvariant::TABSVariant* __fastcall GetValue(bool TrueFalseNullLogic = true);
	bool __fastcall GetResult();
	void __fastcall ResetSubqueryFieldValues();
	Absvariant::TABSVariant* __fastcall GetSubqueryFieldValue(int FieldNo);
	bool __fastcall IsAggregated();
	bool __fastcall IsAggregatedCountAll();
	void __fastcall Init();
	void __fastcall Accumulate();
	void __fastcall SetCountAll(int RecordCount);
	void __fastcall AssignAO(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	void __fastcall AssignCursor(Absbase::TABSCursor* Cursor, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	void __fastcall AssignCursorBuffer(System::PByte Buffer, bool ApplyToParentQueryFields);
	Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	int __fastcall GetDataSize();
	int __fastcall GetPrecision();
	bool __fastcall IsEmpty();
	bool __fastcall IsField();
	bool __fastcall IsFieldsExpression();
	void __fastcall MoveAndNodesToRoot();
	void __fastcall GetFieldInfo(System::UnicodeString &TableName, System::UnicodeString &FieldName);
	void __fastcall ApplyFilterParts(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowRecurse = true, bool ForHavingClause = false);
	void __fastcall ReplacePseudonyms(Absrelationalalgebra::TABSSelectListItem *SelectList, const int SelectList_High);
	int __fastcall ExtractJoinConditions(Absrelationalalgebra::TABSAO* AO1, Absrelationalalgebra::TABSAO* AO2, Absrelationalalgebra::TABSFields* FieldList1, Absrelationalalgebra::TABSFields* FieldList2);
	void __fastcall TryCreateIndexScanConditionsFromNode(TABSExprNode* Node, Absbase::TABSIndexDefs* IndexDefs, Abstypes::TABSScanSearchConditionArray* ScanConditions, int SessionID);
	void __fastcall RemoveExtractedNodes(Abstypes::TABSScanSearchConditionArray* ScanConditions, int ScanConditionNo, int ScanEndConditionNo);
	void __fastcall CreateIndexScanConditions(Absbase::TABSIndexDefs* IndexDefs, Abstypes::TABSScanSearchConditionArray* ScanConditions, int SessionID);
	bool __fastcall ExtendMultiFieldIndexConditionFromNode(TABSExprNode* Node, Abstypes::TABSScanSearchCondition* ScanCondition, Absbase::TABSIndexDef* IndexDef);
	bool __fastcall ExtendMultiFieldIndexCondition(Abstypes::TABSScanSearchCondition* ScanCondition, Absbase::TABSIndexDef* IndexDef);
	void __fastcall AddNode(TABSExprNode* Node);
	void __fastcall AddAndMoveNodesFromExpression(TABSExpression* Expr);
	bool __fastcall CanBeUsedInGroupBy(System::UnicodeString GroupByFields);
	__property bool InMemory = {read=FInMemory, write=FInMemory, nodefault};
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNode : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::Classes::TList* Children;
	Abstypes::TABSDataOperator Operator;
	Absvariant::TABSVariant* Value;
	bool FCaseInsensitive;
	bool FPartialKey;
	virtual void __fastcall PatchWideStrings();
	
public:
	__fastcall TABSExprNode(bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNode(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNode(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNode(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNode(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall virtual ~TABSExprNode();
	virtual Absvariant::TABSVariant* __fastcall GetDataValue() = 0 ;
	virtual void __fastcall ResetSubqueryFieldValues();
	virtual Absvariant::TABSVariant* __fastcall GetSubqueryFieldValue(int FieldNo);
	virtual bool __fastcall IsAggregated();
	virtual bool __fastcall IsAggregatedCountAll();
	virtual void __fastcall Init();
	virtual void __fastcall Accumulate();
	virtual void __fastcall SetCountAll(int RecordCount);
	virtual void __fastcall AssignAO(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	virtual void __fastcall AssignCursor(Absbase::TABSCursor* Cursor, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	virtual void __fastcall AssignCursorBuffer(System::PByte Buffer, bool ApplyToParentQueryFields);
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
	virtual int __fastcall GetPrecision();
	virtual bool __fastcall CanBeAssigned(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool ForHavingClause = false);
	bool __fastcall CanUseNodeAsField(TABSExprNode* Node);
	bool __fastcall CanUseNodeAsConst(TABSExprNode* Node);
	virtual bool __fastcall CanUseIndex(int IndexColumnNo, Abstypes::TABSSearchCondition ConditionSearchOperator, Absbase::TABSIndexDef* IndexDef, int SessionID = 0xffffffff);
	
private:
	void __fastcall FillScanCondition(Absvariant::TABSVariant* Value, Absbase::TABSCursor* Cursor, int IndexColumnNo, int FieldNo, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression, Abstypes::TABSScanSearchCondition* ScanCondition);
	
public:
	virtual void __fastcall AddAsIndexScanCondition(Abstypes::TABSScanSearchConditionArray* ScanConditions, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression);
	virtual void __fastcall ExtendIndexScanCondition(Abstypes::TABSScanSearchCondition* ScanCondition, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression);
	virtual bool __fastcall IsJoinCondition(Absrelationalalgebra::TABSAO* AO1, Absrelationalalgebra::TABSAO* AO2);
	virtual void __fastcall ReplacePseudonyms(Absrelationalalgebra::TABSSelectListItem *SelectList, const int SelectList_High);
	virtual bool __fastcall CanBeUsedInGroupBy(System::UnicodeString GroupByFields);
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeConst : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
public:
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
	bool __fastcall IsLikePatternEqualToPartialComparePattern();
	void __fastcall TruncateForPartialCompare();
	virtual bool __fastcall CanBeAssigned(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool ForHavingClause = false);
	bool __fastcall IsUpperCase();
	bool __fastcall IsLowerCase();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeConst(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeConst(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeConst(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeConst(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeConst(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeConst() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeField : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	Absbase::TABSCursor* LCursor;
	Absrelationalalgebra::TABSAO* LAO;
	System::Byte *LRecordBuffer;
	System::UnicodeString FTableName;
	System::UnicodeString FFieldName;
	System::UnicodeString FFieldNameInAO;
	int FFieldNo;
	int FFieldOffsetInBuffer;
	Abstypes::TABSAdvancedFieldType FFieldType;
	Abstypes::TABSBaseFieldType FBaseFieldType;
	int FFieldSize;
	int FFieldPrecision;
	bool FGetFromParent;
	bool FScanOnlyVisibleFieldsInAO;
	
public:
	__fastcall TABSExprNodeField(Absbase::TABSCursor* Cursor, System::UnicodeString FieldName, System::UnicodeString TableName)/* overload */;
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	bool __fastcall TryAssignAO(Absrelationalalgebra::TABSAO* AOToAssign);
	virtual void __fastcall AssignAO(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	bool __fastcall FindFieldInCursor(Absbase::TABSCursor* Cursor, int &FieldNo);
	virtual void __fastcall AssignCursor(Absbase::TABSCursor* Cursor, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	virtual void __fastcall AssignCursorBuffer(System::PByte Buffer, bool ApplyToParentQueryFields);
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
	virtual bool __fastcall CanBeAssigned(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool ForHavingClause = false);
	void __fastcall FillItem(Absrelationalalgebra::TABSSelectListItem &Item);
	virtual void __fastcall ReplacePseudonyms(Absrelationalalgebra::TABSSelectListItem *SelectList, const int SelectList_High);
	virtual bool __fastcall CanBeUsedInGroupBy(System::UnicodeString GroupByFields);
	__property System::UnicodeString TableName = {read=FTableName};
	__property System::UnicodeString FieldName = {read=FFieldName};
	__property int FieldNo = {read=FFieldNo, nodefault};
	__property int FieldSize = {read=FFieldSize, nodefault};
	__property Abstypes::TABSBaseFieldType BaseFieldType = {read=FBaseFieldType, nodefault};
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeField(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeField(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeField(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeField(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeField(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeField() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeComparison : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	bool F3ValueLogic;
	TABSQuantifier FQuantifier;
	virtual void __fastcall PatchWideStrings();
	Absvariant::TABSVariant* __fastcall GetDataValueByCompare();
	Absvariant::TABSVariant* __fastcall GetDataValueByQuantifiedCompare();
	
public:
	__fastcall TABSExprNodeComparison(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool TrueFalseNullLogic, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNodeComparison(Abstypes::TABSDataOperator Op, TABSQuantifier Quantifier, TABSExprNode* Node1, TABSExprNode* Node2, bool TrueFalseNullLogic, bool CaseInsensitive, bool PartialKey)/* overload */;
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	void __fastcall GetFieldAndConstNodes(TABSExprNodeField* &FieldNode, TABSExprNodeConst* &ConstNode);
	virtual bool __fastcall CanUseIndex(int IndexColumnNo, Abstypes::TABSSearchCondition ConditionSearchOperator, Absbase::TABSIndexDef* IndexDef, int SessionID = 0xffffffff);
	virtual void __fastcall AddAsIndexScanCondition(Abstypes::TABSScanSearchConditionArray* ScanConditions, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression);
	TABSExprNodeField* __fastcall GetFieldNode(TABSExprNode* Node);
	virtual void __fastcall ExtendIndexScanCondition(Abstypes::TABSScanSearchCondition* ScanCondition, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression);
	virtual bool __fastcall IsJoinCondition(Absrelationalalgebra::TABSAO* AO1, Absrelationalalgebra::TABSAO* AO2);
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeComparison(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeComparison(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeComparison(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeComparison(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeComparison(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeComparison() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeBoolean : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	Absvariant::TABSVariant* TempVal;
	System::UnicodeString EscapeStr;
	void __fastcall Like();
	void __fastcall bInSubquery();
	void __fastcall bIn();
	void __fastcall Between();
	void __fastcall Exists();
	
public:
	__fastcall TABSExprNodeBoolean(bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNodeBoolean(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey, System::UnicodeString aEscapeStr)/* overload */;
	__fastcall TABSExprNodeBoolean(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNodeBoolean(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall TABSExprNodeBoolean(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */;
	__fastcall virtual ~TABSExprNodeBoolean();
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual bool __fastcall CanUseIndex(int ColumnNo, Abstypes::TABSSearchCondition ConditionSearchOperator, Absbase::TABSIndexDef* IndexDef, int SessionID = 0xffffffff);
	virtual void __fastcall AddAsIndexScanCondition(Abstypes::TABSScanSearchConditionArray* ScanConditions, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression);
	virtual void __fastcall ExtendIndexScanCondition(Abstypes::TABSScanSearchCondition* ScanCondition, Absbase::TABSIndexDef* IndexDef, TABSExpression* Expression);
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeBoolean(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeArithmetic : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
protected:
	void __fastcall SubData();
	void __fastcall AddData();
	void __fastcall MulData();
	void __fastcall DivData();
	void __fastcall GetABSValue();
	void __fastcall GetACOSValue();
	void __fastcall GetASINValue();
	void __fastcall GetATANValue();
	void __fastcall GetCEILValue();
	void __fastcall GetCOSValue();
	void __fastcall GetEXPValue();
	void __fastcall GetFLOORValue();
	void __fastcall GetLOGValue();
	void __fastcall GetPOWERValue();
	void __fastcall GetRANDValue();
	void __fastcall GetROUNDValue();
	void __fastcall GetSIGNValue();
	void __fastcall GetSINValue();
	void __fastcall GetSQRValue();
	void __fastcall GetSQRTValue();
	
public:
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeArithmetic(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeArithmetic(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeArithmetic(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeArithmetic(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeArithmetic(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeArithmetic() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeAggregated : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	int count;
	bool distinct;
	Absvariant::TABSVariant* AvgSum;
	
public:
	__fastcall TABSExprNodeAggregated(Abstypes::TABSDataOperator Op)/* overload */;
	__fastcall TABSExprNodeAggregated(Abstypes::TABSDataOperator Op, bool distinct, TABSExprNode* Node)/* overload */;
	__fastcall virtual ~TABSExprNodeAggregated();
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
	virtual bool __fastcall IsAggregated();
	virtual bool __fastcall IsAggregatedCountAll();
	virtual bool __fastcall CanBeAssigned(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool ForHavingClause = false);
	virtual void __fastcall Init();
	virtual void __fastcall Accumulate();
	virtual void __fastcall SetCountAll(int RecordCount);
	virtual bool __fastcall CanBeUsedInGroupBy(System::UnicodeString GroupByFields);
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeAggregated(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeAggregated(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeAggregated(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeAggregated(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeAggregated(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeCast : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	Abstypes::TABSAdvancedFieldType FCastType;
	TABSExprNode* LCastSizeNode;
	
public:
	__fastcall TABSExprNodeCast(TABSExprNode* Node, Abstypes::TABSAdvancedFieldType CastType, TABSExprNode* CastSizeNode)/* overload */;
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCast(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCast(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCast(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCast(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCast(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeCast() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeCase : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	System::Classes::TList* FWhenExpressions;
	System::Classes::TList* FResultExpressions;
	TABSExprNode* FElseResultExpression;
	TABSExprNode* FInputExpression;
	TABSExprNodeArray FCoalesceNodes;
	bool FIsCoalesceExpression;
	
public:
	void __fastcall CreateInit();
	__fastcall TABSExprNodeCase(TABSExprNode* InputExpression);
	__fastcall TABSExprNodeCase();
	__fastcall TABSExprNodeCase(TABSExprNodeArray Nodes);
	__fastcall virtual ~TABSExprNodeCase();
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
	void __fastcall AddWhenExpression(TABSExprNode* Node);
	void __fastcall AddResultExpression(TABSExprNode* Node);
	void __fastcall SetElseResultExpression(TABSExprNode* Node);
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCase(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCase(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCase(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCase(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeCase(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeBlob : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	void __fastcall MimeToBin();
	
public:
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeBlob(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeBlob(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeBlob(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeBlob(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeBlob(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeBlob() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeStringFunction : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
protected:
	bool __fastcall InitStringValue();
	void __fastcall Concat();
	void __fastcall Upper();
	void __fastcall Lower();
	void __fastcall Trim();
	void __fastcall LTrim();
	void __fastcall RTrim();
	void __fastcall Length();
	void __fastcall Pos();
	void __fastcall Substring();
	
public:
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeStringFunction(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeStringFunction(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeStringFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeStringFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeStringFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Destroy */ inline __fastcall virtual ~TABSExprNodeStringFunction() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeSystem : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	System::UnicodeString FTableName;
	System::UnicodeString FColumnName;
	bool FInMemory;
	Data::Db::TDataSet* FTable;
	Abstypes::TABSAdvancedFieldType FFieldType;
	int FRowNumValue;
	void __fastcall LastAutoInc();
	void __fastcall RowNum();
	
public:
	__fastcall TABSExprNodeSystem(Abstypes::TABSDataOperator Operator, System::UnicodeString SessionName, System::UnicodeString DatabaseName, System::UnicodeString TableName, System::UnicodeString ColumnName, bool InMemory)/* overload */;
	__fastcall virtual ~TABSExprNodeSystem();
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeSystem(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeSystem(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeSystem(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeSystem(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeSystem(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeDateFunction : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
private:
	Absdateformat::TDateFormater* DateFormater;
	Abstypes::TABSDateTimeExtractField ExtractDateTimeField;
	void __fastcall ToDate();
	HIDESBASE void __fastcall ToString();
	void __fastcall Extract();
	
public:
	__fastcall TABSExprNodeDateFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node, System::UnicodeString FormatStr)/* overload */;
	__fastcall TABSExprNodeDateFunction(Abstypes::TABSDataOperator Op, Abstypes::TABSDateTimeExtractField ExtractField, TABSExprNode* ExtractSource)/* overload */;
	__fastcall virtual ~TABSExprNodeDateFunction();
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
public:
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeDateFunction(bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeDateFunction(Abstypes::TABSDataOperator Op, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeDateFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeDateFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, CaseInsensitive, PartialKey) { }
	/* TABSExprNode.Create */ inline __fastcall TABSExprNodeDateFunction(Abstypes::TABSDataOperator Op, TABSExprNode* Node1, TABSExprNode* Node2, TABSExprNode* Node3, bool CaseInsensitive, bool PartialKey)/* overload */ : TABSExprNode(Op, Node1, Node2, Node3, CaseInsensitive, PartialKey) { }
	
};

#pragma pack(pop)

typedef bool __fastcall (__closure *TCheckResultsMethod)(void);

#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSExprNodeSubquery : public TABSExprNode
{
	typedef TABSExprNode inherited;
	
	
private:
	typedef System::DynamicArray<Absvariant::TABSVariant*> _TABSExprNodeSubquery__1;
	
	
private:
	bool FMustHaveOneField;
	bool FMustHaveOneRow;
	Absvariant::TABSVariant* FValue;
	_TABSExprNodeSubquery__1 FFieldValues;
	Data::Db::TDataSet* LDataset;
	Abslexer::TABSLexer* LLexer;
	Absrelationalalgebra::TABSAO* LAO;
	Absbase::TABSCursor* LCursor;
	System::Byte *LCursorRecordBuffer;
	System::TObject* FSubquery;
	int FCommandNo;
	int FTokenNo;
	Absvariant::TABSVariant* LValueToCheck;
	Absvariant::TABSVariant* FPriorValueToCheck;
	bool FPriorResult;
	bool FPriorResultInitalized;
	Abstypes::TABSDataOperator FCompareOperator;
	TABSQuantifier FCompareQuantifier;
	bool FCorrelated;
	bool __fastcall CheckGetDataValue();
	bool __fastcall CheckGetFieldValues();
	bool __fastcall CheckExists();
	bool __fastcall CheckIsValueIn();
	bool __fastcall CheckQuantifiedCompare();
	bool __fastcall RunQueryAndCheckResults(TCheckResultsMethod CheckMethod);
	
public:
	__fastcall TABSExprNodeSubquery(bool MustHaveOneField, bool MustHaveOneRow, Data::Db::TDataSet* Dataset, Abslexer::TABSLexer* Lexer);
	__fastcall virtual ~TABSExprNodeSubquery();
	virtual void __fastcall AssignCursor(Absbase::TABSCursor* Cursor, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	virtual void __fastcall AssignCursorBuffer(System::PByte Buffer, bool ApplyToParentQueryFields);
	virtual void __fastcall AssignAO(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
	virtual bool __fastcall CanBeAssigned(Absrelationalalgebra::TABSAO* AO, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool ForHavingClause = false);
	virtual Absvariant::TABSVariant* __fastcall GetDataValue();
	virtual void __fastcall ResetSubqueryFieldValues();
	virtual Absvariant::TABSVariant* __fastcall GetSubqueryFieldValue(int FieldNo);
	virtual Abstypes::TABSAdvancedFieldType __fastcall GetDataType();
	virtual int __fastcall GetDataSize();
	bool __fastcall Exists();
	bool __fastcall IsValueIn(Absvariant::TABSVariant* Value);
	bool __fastcall QuantifiedCompare(Abstypes::TABSDataOperator Operator, TABSQuantifier Quantifier, Absvariant::TABSVariant* Value);
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE System::UnicodeString __fastcall GetOperatorName(Abstypes::TABSDataOperator op);
extern DELPHI_PACKAGE Abstypes::TABSAdvancedFieldType __fastcall GetFieldType(const System::UnicodeString TypeName);
extern DELPHI_PACKAGE void __fastcall FillFieldNames(System::Classes::TStringList* List, const System::UnicodeString Names);
extern DELPHI_PACKAGE Abstypes::TABSDataOperator __fastcall ReverseComparisonOperator(Abstypes::TABSDataOperator CompOp);
extern DELPHI_PACKAGE Abstypes::TABSDataOperator __fastcall InvertComparisonOperator(Abstypes::TABSDataOperator CompOp);
extern DELPHI_PACKAGE bool __fastcall IsNonConstantExpression(Absvariant::TABSVariant* Value);
}	/* namespace Absexpressions */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ABSEXPRESSIONS)
using namespace Absexpressions;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AbsexpressionsHPP
