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

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

#ifndef AbssqlprocessorHPP
#define AbssqlprocessorHPP

#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 <Winapi.Windows.hpp>
#include <Data.DB.hpp>
#include <ABSLexer.hpp>
#include <ABSBase.hpp>
#include <ABSRelationalAlgebra.hpp>
#include <ABSTypes.hpp>
#include <ABSExpressions.hpp>
#include <ABSVariant.hpp>
#include <ABSCompression.hpp>
#include <ABSConst.hpp>
#include <ABSConverts.hpp>
#include <ABSExcept.hpp>

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

namespace Abssqlprocessor
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TABSTableReference;
class DELPHICLASS TABSSQLCommand;
class DELPHICLASS TABSSQLCursorCommand;
class DELPHICLASS TABSSQLProcessor;
class DELPHICLASS TABSSQLSelect;
class DELPHICLASS TABSQueryExprNode;
class DELPHICLASS TABSSQLUnion;
class DELPHICLASS TABSSQLInsert;
class DELPHICLASS TABSSQLUpdate;
class DELPHICLASS TABSSQLDelete;
class DELPHICLASS TSQLFieldDef;
class DELPHICLASS TSQLFieldDefs;
struct TABSIndexField;
struct TABSIndex;
class DELPHICLASS TABSDDLTableManipulation;
class DELPHICLASS TABSDDLCreateTable;
class DELPHICLASS TABSDDLDropTable;
class DELPHICLASS TABSDDLTruncateTable;
class DELPHICLASS TABSDDLAlterTable;
class DELPHICLASS TABSDDLRenameTable;
class DELPHICLASS TABSDDLCreateIndex;
class DELPHICLASS TABSDDLDropIndex;
class DELPHICLASS TABSSQLStartTransaction;
class DELPHICLASS TABSSQLCommit;
class DELPHICLASS TABSSQLRollback;
//-- type declarations -------------------------------------------------------
class PASCALIMPLEMENTATION TABSTableReference : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	Abstypes::TABSTableType TableType;
	System::UnicodeString DatabaseName;
	System::UnicodeString TableName;
	System::UnicodeString Pseudonym;
	System::UnicodeString Password;
	bool InMemory;
	bool NaturalJoin;
	Abstypes::TABSJoinType JoinType;
	TABSTableReference* LeftTable;
	TABSTableReference* RightTable;
	System::Classes::TStringList* UsingFields;
	Absexpressions::TABSExpression* SearchCondition;
	TABSSQLUnion* SubQuery;
	System::TObject* ExternalDBToFree;
	__fastcall TABSTableReference();
	__fastcall virtual ~TABSTableReference();
	void __fastcall MakeJoin(TABSTableReference* RightNode, Abstypes::TABSJoinType JType, bool IsNatural, System::Classes::TStringList* Fields, Absexpressions::TABSExpression* OnCondition);
	void __fastcall MakeSubQuery(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
};


class PASCALIMPLEMENTATION TABSSQLCommand : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	Abslexer::TABSLexer* LLex;
	Abslexer::TToken Token;
	Data::Db::TDataSet* LQuery;
	int RowsAffected;
	bool IntoMemory;
	
private:
	void __fastcall ParseColumnList(System::Classes::TStringList* &Fields);
	void __fastcall ParseFieldList(Absrelationalalgebra::TABSFields* &Fields);
	bool __fastcall GetCurrentToken();
	bool __fastcall GetNextToken()/* overload */;
	bool __fastcall GetNextToken(Abslexer::TTokenTypes PermittedTypes, int NativeErrorCode, System::UnicodeString ErrorText)/* overload */;
	
protected:
	void __fastcall ParseTableNameToken(System::UnicodeString &DatabaseFileName, System::UnicodeString &TableName, System::UnicodeString &TableAlias, System::UnicodeString &Password, bool &InMemory);
	void __fastcall CreateDbAndTableComponents(Data::Db::TDataSet* Query, System::UnicodeString DatabaseFileName, System::UnicodeString TableName, System::UnicodeString Password, bool InMemory, Data::Db::TDataSet* &Table, System::TObject* &DB);
	void __fastcall FreeDbAndTableComponents(Data::Db::TDataSet* Table, System::TObject* DB);
	
public:
	__fastcall TABSSQLCommand(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	virtual void __fastcall Parse() = 0 ;
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0)) = 0 ;
	virtual Absbase::TABSCursor* __fastcall GetResultCursor();
	virtual Data::Db::TDataSet* __fastcall GetResultDataset();
	bool __fastcall CheckPseudonym(System::UnicodeString &Pseudonym);
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TABSSQLCommand() { }
	
};


class PASCALIMPLEMENTATION TABSSQLCursorCommand : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
	
private:
	typedef System::DynamicArray<Abstypes::TABSSortSpecification> _TABSSQLCursorCommand__1;
	
	
protected:
	Data::Db::TDataSet* ResultDataset;
	System::UnicodeString IntoDatabase;
	System::UnicodeString IntoTable;
	bool IntoImmediate;
	_TABSSQLCursorCommand__1 OrderBySpecs;
	int OrderBySpecsCount;
	bool __fastcall OpenAndLockTablesBeforeSelect();
	bool __fastcall UnlockTablesAfterSelect();
	bool __fastcall ParseSortSpecification();
	bool __fastcall ParseOrderByClause();
	void __fastcall ApplyOrderBy(Absrelationalalgebra::TABSAO* AO);
	
public:
	Absrelationalalgebra::TABSAO* RootAO;
	__fastcall TABSSQLCursorCommand(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLCursorCommand();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
	virtual bool __fastcall AllConditionsApplied() = 0 ;
	virtual Absrelationalalgebra::TABSAO* __fastcall BuildAOTree(Data::Db::TDataSet* query, bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions) = 0 ;
	virtual Absbase::TABSCursor* __fastcall GetResultCursor();
	virtual Data::Db::TDataSet* __fastcall GetResultDataset();
};


class PASCALIMPLEMENTATION TABSSQLProcessor : public System::TObject
{
	typedef System::TObject inherited;
	
	
private:
	typedef System::DynamicArray<TABSSQLCommand*> _TABSSQLProcessor__1;
	
	
private:
	Data::Db::TDataSet* ABSQuery;
	bool FReadOnly;
	bool FRequestLive;
	bool FInMemory;
	__int64 FRowsAffected;
	Abslexer::TABSLexer* FLex;
	System::UnicodeString FSqlText;
	Abslexer::TABSSQLParams* FSQLParams;
	Absbase::TABSCursor* FCursor;
	_TABSSQLProcessor__1 Queries;
	bool __fastcall ParseNextCommand(Abslexer::TABSLexer* Lexer);
	void __fastcall AddSelectQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddInsertQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddUpdateQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddDeleteQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddTruncateTableQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddCreateTableQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddDropTableQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddAlterTableQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddRenameTableQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddCreateIndex(Abslexer::TABSLexer* Lexer);
	void __fastcall AddDropIndexQuery(Abslexer::TABSLexer* Lexer);
	void __fastcall AddStartTransaction(Abslexer::TABSLexer* Lexer);
	void __fastcall AddCommit(Abslexer::TABSLexer* Lexer);
	void __fastcall AddRollback(Abslexer::TABSLexer* Lexer);
	void __fastcall ClearQueries();
	
public:
	__fastcall TABSSQLProcessor(Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLProcessor();
	Absbase::TABSCursor* __fastcall OpenQuery();
	void __fastcall ExecuteQuery();
	void __fastcall PrepareStatement(System::WideChar * SQLText);
	__property bool ReadOnly = {read=FReadOnly, write=FReadOnly, nodefault};
	__property bool RequestLive = {read=FRequestLive, write=FRequestLive, nodefault};
	__property bool InMemory = {read=FInMemory, write=FInMemory, nodefault};
	__property __int64 RowsAffected = {read=FRowsAffected};
	__property Abslexer::TABSSQLParams* SQLParams = {read=FSQLParams};
};


class PASCALIMPLEMENTATION TABSSQLSelect : public TABSSQLCursorCommand
{
	typedef TABSSQLCursorCommand inherited;
	
	
private:
	typedef System::DynamicArray<Absrelationalalgebra::TABSSelectListItem> _TABSSQLSelect__1;
	
	typedef System::DynamicArray<TABSTableReference*> _TABSSQLSelect__2;
	
	
protected:
	bool Distinct;
	int TopRowCount;
	int FirstRowNo;
	bool AllFields;
	_TABSSQLSelect__1 SelectList;
	int SelectListCount;
	_TABSSQLSelect__2 FromTables;
	int FromTablesCount;
	Absexpressions::TABSExpression* SearchCondition;
	Absrelationalalgebra::TABSFields* GroupByFields;
	Absexpressions::TABSExpression* HavingCondition;
	bool FSubqueryHasNotAppliedConditions;
	bool __fastcall ParseSelectToken();
	bool __fastcall ParseSetQuantifier();
	bool __fastcall ParseTopOperator();
	bool __fastcall DuplicatedFieldExists(const System::UnicodeString TableName, const System::UnicodeString FieldName);
	bool __fastcall FieldExists(const System::UnicodeString TableName, const System::UnicodeString FieldName);
	System::UnicodeString __fastcall GetFieldNameForDuplicatedField(const System::UnicodeString TableName, const System::UnicodeString FieldName);
	bool __fastcall ParseSelectSubList();
	bool __fastcall ParseSelectList();
	bool __fastcall ParseInto();
	bool __fastcall ParseJoinCondition(Absexpressions::TABSExpression* &SearchCondition);
	bool __fastcall ParseNamedColumnsJoin(System::Classes::TStringList* &Fields);
	bool __fastcall ParseJoin(TABSTableReference* &tblRef);
	bool __fastcall ParseFromSubquery(TABSTableReference* tblRef);
	bool __fastcall ParseTableReference(TABSTableReference* tblRef = (TABSTableReference*)(0x0));
	bool __fastcall ParseFromClause();
	bool __fastcall ParseWhereClause();
	bool __fastcall ParseGroupByClause();
	bool __fastcall ParseHavingClause();
	System::UnicodeString __fastcall GetDefaultDatabaseName();
	bool __fastcall GetDisableTempFiles();
	Absrelationalalgebra::TABSAO* __fastcall CreateTableAO(TABSTableReference* &TableRef);
	Absrelationalalgebra::TABSAO* __fastcall CreateJoinedTableAO(TABSTableReference* &TableRef, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
	Absrelationalalgebra::TABSAO* __fastcall CreateSubQueryAO(TABSTableReference* &TableRef, bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
	Absrelationalalgebra::TABSAO* __fastcall CreateAO(TABSTableReference* &TableRef, bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
	Absrelationalalgebra::TABSAO* __fastcall BuildOneTableTree(bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
	Absrelationalalgebra::TABSAO* __fastcall BuildMultiTablesTree(bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
	
public:
	__fastcall TABSSQLSelect(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLSelect();
	virtual void __fastcall Parse();
	virtual bool __fastcall AllConditionsApplied();
	virtual Absrelationalalgebra::TABSAO* __fastcall BuildAOTree(Data::Db::TDataSet* query, bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
};


class PASCALIMPLEMENTATION TABSQueryExprNode : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	Abstypes::TABSQueryExprType NodeType;
	TABSQueryExprNode* Left;
	TABSQueryExprNode* Right;
	bool All;
	bool Corresponding;
	System::Classes::TStringList* CorrespondingFields;
	TABSSQLSelect* SelectCommand;
	__fastcall TABSQueryExprNode()/* overload */;
	__fastcall TABSQueryExprNode(TABSQueryExprNode* Src)/* overload */;
	__fastcall virtual ~TABSQueryExprNode();
	void __fastcall AddNode(Abstypes::TABSQueryExprType NewType, TABSQueryExprNode* RightNode, bool bAll, bool bCorresponding, System::Classes::TStringList* ColumnList = (System::Classes::TStringList*)(0x0));
	bool __fastcall AllConditionsApplied();
	bool __fastcall HasInto();
};


class PASCALIMPLEMENTATION TABSSQLUnion : public TABSSQLCursorCommand
{
	typedef TABSSQLCursorCommand inherited;
	
protected:
	TABSQueryExprNode* FRootNode;
	bool __fastcall ParseAll();
	bool __fastcall ParseCorrespondingSpec(System::Classes::TStringList* &ColumnsList);
	TABSQueryExprNode* __fastcall ParseQuerySpecification();
	TABSQueryExprNode* __fastcall ParseSimpleTable();
	TABSQueryExprNode* __fastcall ParseNonJoinQueryPrimary();
	TABSQueryExprNode* __fastcall ParseNonJoinQueryTerm();
	TABSQueryExprNode* __fastcall ParseNonJoinQueryExpression();
	TABSQueryExprNode* __fastcall ParseQueryExpression();
	Absrelationalalgebra::TABSAO* __fastcall BuildAO(TABSQueryExprNode* Node, bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
	
public:
	__fastcall TABSSQLUnion(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLUnion();
	virtual void __fastcall Parse();
	virtual bool __fastcall AllConditionsApplied();
	virtual Absrelationalalgebra::TABSAO* __fastcall BuildAOTree(Data::Db::TDataSet* query, bool RequestLive, Absrelationalalgebra::TABSAO* ParentQueryAO, Absbase::TABSCursor* ParentCursor, bool AllowNotAppliedConditions);
};


class PASCALIMPLEMENTATION TABSSQLInsert : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
	
private:
	typedef System::DynamicArray<System::Classes::TList*> _TABSSQLInsert__1;
	
	
protected:
	System::UnicodeString TableName;
	System::UnicodeString DatabaseFileName;
	System::UnicodeString Password;
	System::Classes::TStringList* FieldNames;
	_TABSSQLInsert__1 FieldValues;
	TABSSQLSelect* InternalSelecter;
	void __fastcall ParseValuesList();
	
public:
	__fastcall TABSSQLInsert(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLInsert();
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
};


class PASCALIMPLEMENTATION TABSSQLUpdate : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
protected:
	System::UnicodeString DatabaseFileName;
	System::UnicodeString TableName;
	System::UnicodeString Password;
	System::Classes::TStringList* FieldNames;
	System::Classes::TList* FieldValues;
	bool IsFieldValuesSubquery;
	Absexpressions::TABSExpression* FieldValuesSubqueryExpr;
	TABSSQLSelect* InternalSelecter;
	Abslexer::TABSLexer* FSelectLexer;
	System::UnicodeString FTablePseudonym;
	
public:
	__fastcall TABSSQLUpdate(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLUpdate();
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
};


class PASCALIMPLEMENTATION TABSSQLDelete : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
protected:
	TABSSQLSelect* InternalSelecter;
	System::UnicodeString TableName;
	bool FullDelete;
	
public:
	__fastcall TABSSQLDelete(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSSQLDelete();
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
};


class PASCALIMPLEMENTATION TSQLFieldDef : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	System::UnicodeString FieldName;
	bool CreateIfNotExists;
	bool newFieldType;
	Abstypes::TABSAdvancedFieldType FieldType;
	bool newLength;
	int Length;
	bool newRequired;
	bool Required;
	bool newAutoincIncrement;
	__int64 AutoincIncrement;
	bool newAutoincLastValue;
	__int64 AutoincLastValue;
	bool newAutoincMinValue;
	__int64 AutoincMinValue;
	bool newAutoincMaxValue;
	__int64 AutoincMaxValue;
	bool newAutoincCycled;
	bool AutoincCycled;
	bool newBlobBlockSize;
	int BlobBlockSize;
	bool newBlobCompressionAlgorithm;
	Abscompression::TABSCompressionAlgorithm BlobCompressionAlgorithm;
	bool newBlobCompressionMode;
	System::Byte BlobCompressionMode;
	bool newDefaultValue;
	Absvariant::TABSVariant* DefaultValue;
	bool newMinValue;
	Absvariant::TABSVariant* MinValue;
	bool newMaxValue;
	Absvariant::TABSVariant* MaxValue;
	bool newPrimaryKey;
	bool PrimaryKey;
	bool newUnique;
	bool Unique;
	__fastcall TSQLFieldDef();
	__fastcall virtual ~TSQLFieldDef();
};


class PASCALIMPLEMENTATION TSQLFieldDefs : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	TSQLFieldDef* operator[](int Index) { return this->Items[Index]; }
	
protected:
	System::Classes::TList* List;
	TSQLFieldDef* __fastcall GetDef(int Index);
	
public:
	__fastcall TSQLFieldDefs();
	__fastcall virtual ~TSQLFieldDefs();
	TSQLFieldDef* __fastcall AddCreated();
	int __fastcall GetCount();
	__property TSQLFieldDef* Items[int Index] = {read=GetDef/*, default*/};
	__property int Count = {read=GetCount, nodefault};
};


struct DECLSPEC_DRECORD TABSIndexField
{
public:
	System::UnicodeString FieldName;
	bool desc;
	bool nocase;
};


struct DECLSPEC_DRECORD TABSIndex
{
	
private:
	typedef System::DynamicArray<TABSIndexField> _TABSIndex__1;
	
	
public:
	System::UnicodeString IndexName;
	bool Unique;
	bool Primary;
	_TABSIndex__1 IndexFields;
};


class PASCALIMPLEMENTATION TABSDDLTableManipulation : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
	
private:
	typedef System::DynamicArray<TABSIndex> _TABSDDLTableManipulation__1;
	
	
protected:
	System::UnicodeString Password;
	System::UnicodeString DatabaseName;
	System::UnicodeString TableName;
	System::UnicodeString TableAlias;
	TSQLFieldDefs* SQLFieldDefs;
	_TABSDDLTableManipulation__1 Indexes;
	void __fastcall ParseTableElementList();
	HIDESBASE void __fastcall ParseTableNameToken();
	void __fastcall FillColumnType(TSQLFieldDef* &FieldDef);
	void __fastcall ParseColumnRequared(TSQLFieldDef* &FieldDef);
	void __fastcall ParsePassword();
	bool __fastcall ParseDefaultValue(TSQLFieldDef* &FieldDef);
	bool __fastcall ParseMinValue(TSQLFieldDef* &FieldDef);
	bool __fastcall ParseMaxValue(TSQLFieldDef* &FieldDef);
	bool __fastcall ParseFieldPrimaryKey(TSQLFieldDef* &FieldDef);
	bool __fastcall ParseFieldUnique(TSQLFieldDef* &FieldDef);
	bool __fastcall ParsePrimaryKey();
	bool __fastcall ParseIndex();
	void __fastcall ParseIndexField(int IndexNo);
	void __fastcall ParseIndexFields(int IndexNo);
	__int64 __fastcall ParseInteger();
	void __fastcall CreateInternalABSTable(Data::Db::TDataSet* query, Data::Db::TDataSet* &table, System::TObject* &db, bool FillAdvFieldDefs);
	void __fastcall FillAdvFieldDef(Data::Db::TFieldDef* AdvFieldDef, TSQLFieldDef* SQLFieldDef);
	void __fastcall AddIndexes(Data::Db::TDataSet* T);
	void __fastcall DeletePrimaryKey(Data::Db::TDataSet* T);
	
public:
	__fastcall TABSDDLTableManipulation(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSDDLTableManipulation();
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0)) = 0 ;
};


class PASCALIMPLEMENTATION TABSDDLCreateTable : public TABSDDLTableManipulation
{
	typedef TABSDDLTableManipulation inherited;
	
private:
	bool FCreateIfNotExists;
	
protected:
	void __fastcall CreateTable(Data::Db::TDataSet* query);
	
public:
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TABSDDLTableManipulation.Create */ inline __fastcall TABSDDLCreateTable(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSDDLTableManipulation(Lexer, Query) { }
	/* TABSDDLTableManipulation.Destroy */ inline __fastcall virtual ~TABSDDLCreateTable() { }
	
};


class PASCALIMPLEMENTATION TABSDDLDropTable : public TABSDDLTableManipulation
{
	typedef TABSDDLTableManipulation inherited;
	
protected:
	void __fastcall DropTable(Data::Db::TDataSet* query);
	
public:
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TABSDDLTableManipulation.Create */ inline __fastcall TABSDDLDropTable(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSDDLTableManipulation(Lexer, Query) { }
	/* TABSDDLTableManipulation.Destroy */ inline __fastcall virtual ~TABSDDLDropTable() { }
	
};


class PASCALIMPLEMENTATION TABSDDLTruncateTable : public TABSDDLTableManipulation
{
	typedef TABSDDLTableManipulation inherited;
	
protected:
	void __fastcall TruncateTable(Data::Db::TDataSet* query);
	
public:
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TABSDDLTableManipulation.Create */ inline __fastcall TABSDDLTruncateTable(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSDDLTableManipulation(Lexer, Query) { }
	/* TABSDDLTableManipulation.Destroy */ inline __fastcall virtual ~TABSDDLTruncateTable() { }
	
};


enum DECLSPEC_DENUM TAlterType : unsigned char { atAdd, atDrop, atModify, atRenameColumn, atRenameTable };

class PASCALIMPLEMENTATION TABSDDLAlterTable : public TABSDDLTableManipulation
{
	typedef TABSDDLTableManipulation inherited;
	
protected:
	TAlterType AlterType;
	System::UnicodeString NewPassword;
	bool NewEncrypted;
	System::Classes::TStringList* DropColumnNamesList;
	System::Classes::TStringList* RenameColumnOldNamesList;
	System::Classes::TStringList* RenameColumnNewNamesList;
	System::UnicodeString NewTableName;
	void __fastcall ParseAlterTypeToken();
	void __fastcall ParseNewPasswordToken();
	void __fastcall ParseRenameColumnsList();
	void __fastcall DropColumn(Data::Db::TDataSet* T);
	void __fastcall AddColumn(Data::Db::TDataSet* T);
	void __fastcall Modify(Data::Db::TDataSet* T);
	void __fastcall RenameColumn(Data::Db::TDataSet* T);
	
public:
	__fastcall TABSDDLAlterTable(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	__fastcall virtual ~TABSDDLAlterTable();
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
};


class PASCALIMPLEMENTATION TABSDDLRenameTable : public TABSDDLAlterTable
{
	typedef TABSDDLAlterTable inherited;
	
public:
	virtual void __fastcall Parse();
public:
	/* TABSDDLAlterTable.Create */ inline __fastcall TABSDDLRenameTable(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSDDLAlterTable(Lexer, Query) { }
	/* TABSDDLAlterTable.Destroy */ inline __fastcall virtual ~TABSDDLRenameTable() { }
	
};


class PASCALIMPLEMENTATION TABSDDLCreateIndex : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
	
private:
	typedef System::DynamicArray<TABSIndexField> _TABSDDLCreateIndex__1;
	
	
protected:
	bool Unique;
	System::UnicodeString IndexName;
	System::UnicodeString DatabaseFileName;
	System::UnicodeString TableName;
	System::UnicodeString TableAlias;
	System::UnicodeString Password;
	bool InMemory;
	_TABSDDLCreateIndex__1 ABSIndexFields;
	
public:
	__fastcall TABSDDLCreateIndex(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TABSDDLCreateIndex() { }
	
};


class PASCALIMPLEMENTATION TABSDDLDropIndex : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
protected:
	System::UnicodeString IndexName;
	System::UnicodeString DatabaseFileName;
	System::UnicodeString TableName;
	System::UnicodeString TableAlias;
	System::UnicodeString Password;
	bool InMemory;
	
public:
	__fastcall TABSDDLDropIndex(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query);
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TABSDDLDropIndex() { }
	
};


class PASCALIMPLEMENTATION TABSSQLStartTransaction : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
public:
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TABSSQLCommand.Create */ inline __fastcall TABSSQLStartTransaction(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSSQLCommand(Lexer, Query) { }
	
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TABSSQLStartTransaction() { }
	
};


class PASCALIMPLEMENTATION TABSSQLCommit : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
private:
	bool FFlush;
	
public:
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TABSSQLCommand.Create */ inline __fastcall TABSSQLCommit(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSSQLCommand(Lexer, Query) { }
	
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TABSSQLCommit() { }
	
};


class PASCALIMPLEMENTATION TABSSQLRollback : public TABSSQLCommand
{
	typedef TABSSQLCommand inherited;
	
public:
	virtual void __fastcall Parse();
	virtual void __fastcall ExecSQL(Data::Db::TDataSet* query, bool IsRoot, bool RequestLive, bool &ReadOnly, Absrelationalalgebra::TABSAO* ParentQueryAO = (Absrelationalalgebra::TABSAO*)(0x0), Absbase::TABSCursor* ParentCursor = (Absbase::TABSCursor*)(0x0));
public:
	/* TABSSQLCommand.Create */ inline __fastcall TABSSQLRollback(Abslexer::TABSLexer* Lexer, Data::Db::TDataSet* Query) : TABSSQLCommand(Lexer, Query) { }
	
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TABSSQLRollback() { }
	
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE void __fastcall SetABSVariantIntoField(Absvariant::TABSVariant* Value, Data::Db::TField* Field);
}	/* namespace Abssqlprocessor */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ABSSQLPROCESSOR)
using namespace Abssqlprocessor;
#endif
#pragma pack(pop)
#pragma option pop

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