📄 absrelationalalgebra.hpp
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'Absrelationalalgebra.pas' rev: 10.00
#ifndef AbsrelationalalgebraHPP
#define AbsrelationalalgebraHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp> // Pascal unit
#include <Sysinit.hpp> // Pascal unit
#include <Windows.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
#include <Db.hpp> // Pascal unit
#include <Sysutils.hpp> // Pascal unit
#include <Math.hpp> // Pascal unit
#include <Absconst.hpp> // Pascal unit
#include <Absconverts.hpp> // Pascal unit
#include <Absexcept.hpp> // Pascal unit
#include <Absbase.hpp> // Pascal unit
#include <Abstypes.hpp> // Pascal unit
#include <Absvariant.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Absrelationalalgebra
{
//-- type declarations -------------------------------------------------------
struct TABSFieldLink
{
public:
AnsiString FieldName;
AnsiString DisplayName;
Abstypes::TABSAdvancedFieldType FieldType;
int FieldPrecision;
int FieldSize;
Byte BLOBCompressionAlgorithm;
Byte BLOBCompressionMode;
int BLOBBlockSize;
void *AO;
Db::TDataSet* Dataset;
bool IsHidden;
int FieldNo;
bool IsExpression;
bool IsAggregate;
System::TObject* Expr;
} ;
struct TABSSelectListItem
{
public:
AnsiString TableName;
bool AllFields;
AnsiString FieldName;
bool IsExpression;
bool IsDuplicatedField;
System::TObject* ValueExpr;
AnsiString Pseudonym;
} ;
typedef DynamicArray<TABSSelectListItem > ABSRelationalAlgebra__2;
class DELPHICLASS TABSFields;
class PASCALIMPLEMENTATION TABSFields : public System::TObject
{
typedef System::TObject inherited;
public:
DynamicArray<TABSSelectListItem > Items;
int ItemCount;
__fastcall TABSFields(void);
void __fastcall Append(TABSSelectListItem &Item);
public:
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TABSFields(void) { }
#pragma option pop
};
typedef DynamicArray<int > ABSRelationalAlgebra__4;
typedef DynamicArray<TABSFieldLink > ABSRelationalAlgebra__5;
class DELPHICLASS TABSAO;
class PASCALIMPLEMENTATION TABSAO : public System::TObject
{
typedef System::TObject inherited;
public:
bool FIsRootAO;
bool FIsAOTable;
bool FIsAOGroupBy;
System::TObject* FFilterExpr;
__int64 FTopRowCount;
__int64 FFirstRowNo;
bool FHasSetResultFields;
AnsiString FResultTableName;
protected:
bool FResultInMemory;
bool FResultImmediate;
AnsiString FResultDatabaseName;
AnsiString FTableName;
AnsiString FTableAlias;
bool FIsMaterialized;
Db::TDataSet* FResultDataset;
Abstypes::TABSIntegerArray* FResultFieldsOrder;
int FFieldCount;
bool FLeftAONull;
bool FRightAONull;
bool FDistinctApplied;
AnsiString FDistinctFields;
int FDistinctFieldCount;
DynamicArray<int > FDistinctFieldsMap;
Classes::TStringList* FResultIndexFieldsList;
Classes::TStringList* FResultIndexAscDescFieldsList;
Classes::TStringList* FResultIndexCaseInsFieldsList;
bool FExpressionsExists;
bool FIsLocked;
bool FDisableTempFiles;
Absvariant::TABSVariant* FValue;
DynamicArray<TABSFieldLink > FFieldLinks;
public:
TABSAO* FLeftAO;
TABSAO* FRightAO;
protected:
void __fastcall InternalCreate(TABSAO* LeftAO = (TABSAO*)(0x0), TABSAO* RightAO = (TABSAO*)(0x0), AnsiString TableName = "", AnsiString TableAlias = "");
virtual void __fastcall InternalFirst(void);
virtual void __fastcall InternalNext(void);
virtual bool __fastcall InternalGetEof(void);
virtual int __fastcall InternalGetRecordCount(void);
virtual void __fastcall First(void);
virtual void __fastcall Next(void);
virtual bool __fastcall GetEof(void);
virtual int __fastcall GetRecordCount(void);
virtual void __fastcall SetFieldNames(void);
AnsiString __fastcall CreateIndexForMaterialize(bool BeforeCreateTable);
void __fastcall CreateTableForMaterialize(Classes::TStringList* FieldList, Classes::TStringList* AliasList);
void __fastcall FillTableForMaterialize(void);
void __fastcall ReplaceInIndexAliasesToFields(Classes::TStringList* FieldList, Classes::TStringList* AliasList, Classes::TStringList* FResultIndexFieldsList);
void __fastcall FinalizeMaterialize(Classes::TStringList* FieldList, Classes::TStringList* AliasList);
void __fastcall DoMaterialize(void);
public:
__fastcall virtual ~TABSAO(void);
virtual void __fastcall Execute(bool IsRootAO, TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
bool __fastcall LockTables(void);
bool __fastcall UnlockTables(void);
bool __fastcall OpenTables(void);
bool __fastcall CloseTables(void);
void __fastcall SetFilter(System::TObject* FilterExpr);
void __fastcall SetResultTable(bool InMemory, bool Immediate, AnsiString TableName, AnsiString DatabaseName);
virtual void __fastcall SetTopRowCount(int FirstRowNo, int TopRowCount);
void __fastcall ApplyDistinct(AnsiString DistinctFields);
virtual void __fastcall SetResultFields(TABSSelectListItem * FieldRefs, const int FieldRefs_Size, bool bDistinct);
virtual int __fastcall FieldExists(AnsiString FieldName, AnsiString TableName, bool Unhide, Abstypes::TABSIntegerArray* FieldNumbers = (Abstypes::TABSIntegerArray*)(0x0), bool UnhideChildrenOnly = false, bool ScanOnlyVisibleFields = false);
bool __fastcall FindFieldInFieldLinks(AnsiString FieldName, int &FieldNo);
AnsiString __fastcall GetFieldName(int FieldNo, bool ApplyOrderBy = false);
AnsiString __fastcall GetFieldNameByColumnName(AnsiString ColumnName);
AnsiString __fastcall GetFieldNameByColumnNo(int ColumnNo);
AnsiString __fastcall GetFieldNameByVisibleNumber(int VisibleFieldNo);
int __fastcall GetFieldNoByVisibleNumber(int VisibleFieldNo);
void __fastcall GetFieldValue(Absvariant::TABSVariant* Value, int FieldNo, bool bCopy = false, bool AccessToHidden = false);
Abstypes::TABSAdvancedFieldType __fastcall GetFieldType(int FieldNo)/* overload */;
int __fastcall GetFieldSize(int FieldNo);
int __fastcall GetFieldPrecision(int FieldNo);
void __fastcall CopyFieldValue(int SrcFieldNo, int DestFieldNo);
bool __fastcall GetFieldDatsetAndFieldNo(Db::TDataSet* &SrcFieldDatset, int &SrcFieldDatasetFieldNo);
private:
void __fastcall InternalSetDistinct(void);
void __fastcall InternalSetIndex(bool ToClearFields = true);
void __fastcall CreateResultIndexLists(bool ToClear = true);
void __fastcall FreeResultIndexLists(void);
void __fastcall AddFieldLink(int FieldLinkNo, bool SkipHiddenFields = true);
public:
virtual void __fastcall SetIndex(AnsiString IndexFieldNames, AnsiString DescFields, AnsiString CaseInsensitiveFields);
__property bool IsMaterialized = {read=FIsMaterialized, nodefault};
__property int FieldCount = {read=FFieldCount, nodefault};
__property int RecordCount = {read=GetRecordCount, nodefault};
__property Db::TDataSet* ResultDataset = {read=FResultDataset};
__property bool Eof = {read=GetEof, nodefault};
__property AnsiString TableAlias = {read=FTableAlias, write=FTableAlias};
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TABSAO(void) : System::TObject() { }
#pragma option pop
};
class DELPHICLASS TABSAOTable;
class PASCALIMPLEMENTATION TABSAOTable : public TABSAO
{
typedef TABSAO inherited;
private:
System::TObject* FDatabase;
public:
__fastcall TABSAOTable(AnsiString TableName, AnsiString TableAlias, System::TObject* DB, Db::TDataSet* Table);
__fastcall virtual ~TABSAOTable(void);
virtual void __fastcall Execute(bool IsRootAO, TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
virtual void __fastcall SetResultFields(TABSSelectListItem * FieldRefs, const int FieldRefs_Size, bool bDistinct);
bool __fastcall TransferIndexToParentIfNeeded(Classes::TStringList* &FieldNamesList, Classes::TStringList* &AscDescList, Classes::TStringList* &CaseSensitivityList);
__property IsMaterialized ;
__property FieldCount ;
__property RecordCount ;
__property ResultDataset ;
__property Eof ;
};
class DELPHICLASS TABSAOJoin;
class PASCALIMPLEMENTATION TABSAOJoin : public TABSAO
{
typedef TABSAO inherited;
private:
bool FDekart;
bool FOuterJoin;
bool FInnerJoin;
Abstypes::TABSJoinType FJoinType;
Abstypes::TABSIntegerArray* FFields1;
Abstypes::TABSIntegerArray* FFields2;
System::TObject* FJoinCondition;
Abstypes::TABSCompareResult FCompareResult;
bool FEqualStarted;
bool FFirstTimeCalled;
bool FEof;
void *FRightBeginBookmark;
void *FRightEndBookmark;
bool FBothNullsStarted;
bool FLeftAOEmpty;
bool FRightAOEmpty;
int FLinkCount;
bool FFieldsLink;
protected:
void __fastcall CompareRecords(void)/* overload */;
virtual void __fastcall InternalFirst(void);
virtual void __fastcall InternalNext(void);
virtual bool __fastcall InternalGetEof(void);
virtual int __fastcall InternalGetRecordCount(void);
public:
__fastcall TABSAOJoin(TABSAO* LeftChild, TABSAO* RightChild, Abstypes::TABSJoinType JoinType, bool IsNatural, TABSFields* FieldList1, TABSFields* FieldList2, System::TObject* JoinCondition);
__fastcall virtual ~TABSAOJoin(void);
virtual void __fastcall Execute(bool IsRootAO, TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
__property IsMaterialized ;
__property FieldCount ;
__property RecordCount ;
__property ResultDataset ;
__property Eof ;
__property bool OuterJoin = {read=FOuterJoin, nodefault};
};
class DELPHICLASS TABSAOUnion;
class PASCALIMPLEMENTATION TABSAOUnion : public TABSAO
{
typedef TABSAO inherited;
private:
bool FEof;
Abstypes::TABSUnionType FUnionType;
Abstypes::TABSIntegerArray* FFields1;
Abstypes::TABSIntegerArray* FFields2;
Abstypes::TABSCompareResult FCompareResult;
bool FFirstTimeCalled;
bool FShowLeft;
protected:
void __fastcall CompareRecords(void);
void __fastcall ShowLeftAO(void);
void __fastcall ShowRightAO(void);
virtual void __fastcall InternalFirst(void);
virtual void __fastcall InternalNext(void);
virtual bool __fastcall InternalGetEof(void);
virtual int __fastcall InternalGetRecordCount(void);
public:
__fastcall TABSAOUnion(TABSAO* LeftChild, TABSAO* RightChild, Abstypes::TABSUnionType UnionType, TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool IsCorresponding, bool bDistinct, TABSFields* FieldList);
__fastcall virtual ~TABSAOUnion(void);
__property IsMaterialized ;
__property FieldCount ;
__property RecordCount ;
__property ResultDataset ;
__property Eof ;
};
class DELPHICLASS TABSAOTableExpr;
class PASCALIMPLEMENTATION TABSAOTableExpr : public TABSAO
{
typedef TABSAO inherited;
private:
void __fastcall ReplacePseudonymsInIndexFields(void);
void __fastcall AddHiddenIndexFields(void);
protected:
virtual void __fastcall InternalFirst(void);
virtual void __fastcall InternalNext(void);
virtual bool __fastcall InternalGetEof(void);
virtual int __fastcall InternalGetRecordCount(void);
public:
__fastcall TABSAOTableExpr(TABSAO* Child);
virtual void __fastcall SetTopRowCount(int FirstRowNo, int TopRowCount);
virtual void __fastcall Execute(bool IsRootAO, TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor);
__property IsMaterialized ;
__property FieldCount ;
__property RecordCount ;
__property ResultDataset ;
__property Eof ;
public:
#pragma option push -w-inl
/* TABSAO.Destroy */ inline __fastcall virtual ~TABSAOTableExpr(void) { }
#pragma option pop
};
class DELPHICLASS TABSAOGroupBy;
class PASCALIMPLEMENTATION TABSAOGroupBy : public TABSAO
{
typedef TABSAO inherited;
protected:
Db::TDataSet* FTempDataset;
bool FFirstTimeCalled;
bool FAllFields;
Abstypes::TABSIntegerArray* FFields;
Abstypes::TABSCompareResult FCompareResult;
bool FGroupFinished;
bool FEOF;
AnsiString GroupByFields;
void __fastcall CompareRecords(void);
virtual void __fastcall InternalFirst(void);
virtual void __fastcall InternalNext(void);
virtual bool __fastcall InternalGetEof(void);
virtual int __fastcall InternalGetRecordCount(void);
bool __fastcall IsCountAll(void);
void __fastcall DoCountAll(void);
public:
virtual void __fastcall SetResultFields(TABSSelectListItem * FieldRefs, const int FieldRefs_Size, bool bDistinct);
__fastcall TABSAOGroupBy(TABSAO* Child, TABSFields* FieldList, TABSSelectListItem * FieldRefs, const int FieldRefs_Size);
__fastcall virtual ~TABSAOGroupBy(void);
__property IsMaterialized ;
__property FieldCount ;
__property RecordCount ;
__property ResultDataset ;
__property Eof ;
};
class DELPHICLASS TABSAOSQLTopRowCount;
class PASCALIMPLEMENTATION TABSAOSQLTopRowCount : public TABSAO
{
typedef TABSAO inherited;
protected:
virtual void __fastcall InternalFirst(void);
virtual void __fastcall InternalNext(void);
virtual bool __fastcall InternalGetEof(void);
virtual int __fastcall InternalGetRecordCount(void);
public:
__fastcall TABSAOSQLTopRowCount(TABSAO* Child);
virtual void __fastcall SetTopRowCount(int FirstRowNo, int TopRowCount);
__property IsMaterialized ;
__property FieldCount ;
__property RecordCount ;
__property ResultDataset ;
__property Eof ;
public:
#pragma option push -w-inl
/* TABSAO.Destroy */ inline __fastcall virtual ~TABSAOSQLTopRowCount(void) { }
#pragma option pop
};
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall ConvertIndexFieldNamesToLists(AnsiString FieldNames, AnsiString DescFields, AnsiString CaseInsFields, Classes::TStringList* FieldList, Classes::TStringList* AscDescList, Classes::TStringList* CaseInsList);
extern PACKAGE void __fastcall ConvertListsToIndexFieldNames(AnsiString &FieldNames, AnsiString &DescNames, AnsiString &CaseInsNames, Classes::TStringList* FieldList, Classes::TStringList* AscDescList, Classes::TStringList* CaseInsList);
} /* namespace Absrelationalalgebra */
using namespace Absrelationalalgebra;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Absrelationalalgebra
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -