⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 absmain.hpp

📁 Absolute Database 5.12 src. Absolute Database lets you forget the Borland Database Engine (BDE). Th
💻 HPP
📖 第 1 页 / 共 4 页
字号:
	
public:
	virtual Classes::TStream* __fastcall CreateBlobStream(Db::TField* Field, Db::TBlobStreamMode Mode);
	virtual void __fastcall CloseBlob(Db::TField* Field);
	void __fastcall GetDatabaseNameList(Classes::TStrings* List);
	__property Absbase::TABSCursor* Handle = {read=FHandle};
	__property TABSDatabase* Database = {read=FDatabase};
	__property TABSSession* DBSession = {read=GetDBSession};
	__property Db::TIndexDefs* IndexDefs = {read=FIndexDefs, write=SetIndexDefs, stored=IndexDefsStored};
	__property FieldDefs  = {stored=FieldDefsStored};
	__property TABSAdvIndexDefs* AdvIndexDefs = {read=FAdvIndexDefs};
	__property TABSAdvFieldDefs* AdvFieldDefs = {read=FAdvFieldDefs};
	__property int KeySize = {read=FKeySize, nodefault};
	__property bool StoreDefs = {read=FStoreDefs, write=FStoreDefs, default=0};
	
__published:
	__property AnsiString CurrentVersion = {read=GetCurrentVersion, write=FCurrentVersion};
	__property AnsiString DatabaseName = {read=FDatabaseName, write=SetDatabaseName};
	__property AnsiString SessionName = {read=FSessionName, write=SetSessionName};
	__property bool InMemory = {read=FInMemory, write=SetInMemory, nodefault};
	__property bool ReadOnly = {read=FReadOnly, write=FReadOnly, nodefault};
	__property Active  = {default=0};
	__property AutoCalcFields  = {default=1};
	__property Filter ;
	__property Filtered  = {default=0};
	__property FilterOptions  = {default=0};
	__property BeforeOpen ;
	__property AfterOpen ;
	__property BeforeClose ;
	__property AfterClose ;
	__property BeforeInsert ;
	__property AfterInsert ;
	__property BeforeEdit ;
	__property AfterEdit ;
	__property BeforePost ;
	__property AfterPost ;
	__property BeforeCancel ;
	__property AfterCancel ;
	__property BeforeDelete ;
	__property AfterDelete ;
	__property BeforeScroll ;
	__property AfterScroll ;
	__property BeforeRefresh ;
	__property AfterRefresh ;
	__property OnCalcFields ;
	__property OnDeleteError ;
	__property OnEditError ;
	__property OnFilterRecord ;
	__property OnNewRecord ;
	__property OnPostError ;
	__property Db::TUpdateRecordEvent OnUpdateRecord = {read=FOnUpdateRecord, write=FOnUpdateRecord};
	
/* Hoisted overloads: */
	
protected:
	inline int __fastcall  PSExecuteStatement(const WideString ASQL, Db::TParams* AParams, void * ResultSet = (void *)(0x0)){ return TDataSet::PSExecuteStatement(ASQL, AParams, ResultSet); }
	
public:
	inline bool __fastcall  GetFieldData(int FieldNo, void * Buffer){ return TDataSet::GetFieldData(FieldNo, Buffer); }
	inline bool __fastcall  GetFieldData(Db::TField* Field, void * Buffer, bool NativeFormat){ return TDataSet::GetFieldData(Field, Buffer, NativeFormat); }
	
protected:
	inline void __fastcall  SetFieldData(Db::TField* Field, void * Buffer, bool NativeFormat){ TDataSet::SetFieldData(Field, Buffer, NativeFormat); }
	
};


class PASCALIMPLEMENTATION TABSBLOBStream : public Abscompression::TABSStream 
{
	typedef Abscompression::TABSStream inherited;
	
private:
	Db::TBlobField* FField;
	TABSDataSet* FDataSet;
	Abscompression::TABSStream* FBLOBStream;
	
protected:
	void __fastcall InternalSetSize(const __int64 NewSize);
	virtual void __fastcall SetSize(int NewSize)/* overload */;
	virtual void __fastcall SetSize(const __int64 NewSize)/* overload */;
	
public:
	virtual int __fastcall Read(void *Buffer, int Count);
	virtual int __fastcall Write(const void *Buffer, int Count);
	virtual int __fastcall Seek(int Offset, Word Origin)/* overload */;
	virtual __int64 __fastcall Seek(const __int64 Offset, Classes::TSeekOrigin Origin)/* overload */;
	__fastcall TABSBLOBStream(Db::TBlobField* Field, Db::TBlobStreamMode Mode);
	__fastcall virtual ~TABSBLOBStream(void);
	void __fastcall Truncate(void);
};


class DELPHICLASS TABSSessionList;
class PASCALIMPLEMENTATION TABSSessionList : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TABSSession* operator[](int Index) { return Sessions[Index]; }
	
private:
	Classes::TThreadList* FSessions;
	Classes::TBits* FSessionNumbers;
	void __fastcall AddSession(TABSSession* ASession);
	void __fastcall CloseAll(void);
	int __fastcall GetCount(void);
	TABSSession* __fastcall GetSession(int Index);
	TABSSession* __fastcall GetCurrentSession(void);
	TABSSession* __fastcall GetSessionByName(const AnsiString SessionName);
	void __fastcall SetCurrentSession(TABSSession* Value);
	
public:
	__fastcall TABSSessionList(void);
	__fastcall virtual ~TABSSessionList(void);
	TABSSession* __fastcall FindSession(const AnsiString SessionName);
	void __fastcall GetSessionNames(Classes::TStrings* List);
	TABSSession* __fastcall OpenSession(const AnsiString SessionName);
	__property int Count = {read=GetCount, nodefault};
	__property TABSSession* CurrentSession = {read=GetCurrentSession, write=SetCurrentSession};
	__property TABSSession* Sessions[int Index] = {read=GetSession/*, default*/};
	__property TABSSession* List[AnsiString SessionName] = {read=GetSessionByName};
};


typedef void __fastcall (__closure *TABSDataSetNotifyEvent)(System::TObject* DataSet);

typedef DynamicArray<Word >  ABSMain__6;

class DELPHICLASS TABSExportToSqlOptions;
class PASCALIMPLEMENTATION TABSExportToSqlOptions : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FStructure;
	bool FAddDropTable;
	bool FBlobSettings;
	bool FData;
	bool FFieldNamesInInserts;
	
public:
	__fastcall TABSExportToSqlOptions(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property bool Structure = {read=FStructure, write=FStructure, default=1};
	__property bool AddDropTable = {read=FAddDropTable, write=FAddDropTable, default=1};
	__property bool BlobSettings = {read=FBlobSettings, write=FBlobSettings, default=0};
	__property bool Data = {read=FData, write=FData, default=0};
	__property bool FieldNamesInInserts = {read=FFieldNamesInInserts, write=FFieldNamesInInserts, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TABSExportToSqlOptions(void) { }
	#pragma option pop
	
};


class DELPHICLASS TABSTable;
class PASCALIMPLEMENTATION TABSTable : public TABSDataSet 
{
	typedef TABSDataSet inherited;
	
private:
	AnsiString FTableName;
	bool FExclusive;
	bool FTemporary;
	AnsiString FIndexName;
	bool FFieldsIndex;
	Db::TMasterDataLink* FMasterLink;
	bool FDisableTempFiles;
	Absdlgwait::TfrmWait* frmWait;
	bool FIsRepairing;
	TABSDataSetNotifyEvent FBeforeCopy;
	TABSProgressEvent FOnCopyProgress;
	TABSDataSetNotifyEvent FAfterCopy;
	TABSDataSetNotifyEvent FBeforeImport;
	TABSProgressEvent FOnImportProgress;
	TABSDataSetNotifyEvent FAfterImport;
	TABSDataSetNotifyEvent FBeforeExport;
	TABSProgressEvent FOnExportProgress;
	TABSDataSetNotifyEvent FAfterExport;
	TABSDataSetNotifyEvent FBeforeRestructure;
	TABSProgressEvent FOnRestructureProgress;
	TABSDataSetNotifyEvent FAfterRestructure;
	TABSDataSetNotifyEvent FBeforeBatchMove;
	TABSProgressEvent FOnBatchMoveProgress;
	TABSDataSetNotifyEvent FAfterBatchMove;
	TABSExportToSqlOptions* FExportToSqlOptions;
	void __fastcall CheckBlankTableName(void);
	void __fastcall AutoCorrectAdvFieldDefs(void);
	void __fastcall AutoCorrectFieldDefs(void);
	void __fastcall CheckAdvFieldDefs(void);
	void __fastcall AutoCorrectAdvIndexDefs(void);
	void __fastcall SetTemporary(const bool Value);
	AnsiString __fastcall GetIndexFieldNames();
	AnsiString __fastcall GetIndexName();
	void __fastcall GetIndexParams(AnsiString IndexName, bool FieldsIndex, AnsiString &IndexedName);
	HIDESBASE bool __fastcall IndexDefsStored(void);
	void __fastcall SetIndex(const AnsiString Value, bool FieldsIndex);
	void __fastcall SetIndexFieldNames(const AnsiString Value);
	void __fastcall SetIndexName(const AnsiString Value);
	void __fastcall SetTableName(const AnsiString Value);
	
public:
	AnsiString __fastcall FindOrCreateIndex(Classes::TStringList* FieldNamesList, Classes::TStringList* AscDescList, Classes::TStringList* CaseSensitivityList, bool &IsCreated);
	bool __fastcall IndexExists(Classes::TStringList* FieldNamesList, Classes::TStringList* AscDescList, Classes::TStringList* CaseSensitivityList);
	void __fastcall ApplyDistinct(Classes::TStringList* FieldNamesList, Classes::TStringList* AscDescList, Classes::TStringList* CaseSensitivityList)/* overload */;
	void __fastcall ApplyDistinct(TABSDataSet* ds)/* overload */;
	
private:
	bool __fastcall GetTableExists(void);
	void __fastcall CheckMasterRange(void);
	void __fastcall UpdateRange(void);
	void __fastcall MasterChanged(System::TObject* Sender);
	void __fastcall MasterDisabled(System::TObject* Sender);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	AnsiString __fastcall GetMasterFields();
	void __fastcall SetMasterFields(const AnsiString Value);
	
protected:
	virtual Db::TIndexDef* __fastcall PSGetDefaultOrder(void);
	virtual AnsiString __fastcall PSGetKeyFields();
	virtual AnsiString __fastcall PSGetTableName();
	virtual Db::TIndexDefs* __fastcall PSGetIndexDefs(Db::TIndexOptions IndexTypes);
	virtual void __fastcall PSSetCommandText(const AnsiString CommandText)/* overload */;
	virtual void __fastcall PSSetParams(Db::TParams* AParams);
	virtual void __fastcall PrepareCursor(void);
	virtual Absbase::TABSCursor* __fastcall CreateHandle(void);
	virtual void __fastcall DataEvent(Db::TDataEvent Event, int Info);
	virtual void __fastcall DefChanged(System::TObject* Sender);
	virtual void __fastcall InitFieldDefs(void);
	virtual void __fastcall DestroyHandle(void);
	Absbase::TABSCursor* __fastcall GetHandle(void);
	virtual void __fastcall UpdateIndexDefs(void);
	Db::TField* __fastcall GetIndexField(int Index);
	void __fastcall SetIndexField(int Index, Db::TField* Value);
	void __fastcall SetLinkRanges(Classes::TList* MasterFields);
	virtual Db::TDataSource* __fastcall GetDataSource(void);
	virtual void __fastcall DoOnNewRecord(void);
	int __fastcall GetIndexFieldCount(void);
	__property Db::TMasterDataLink* MasterLink = {read=FMasterLink};
	
public:
	__fastcall virtual TABSTable(Classes::TComponent* AOwner);
	__fastcall virtual ~TABSTable(void);
	void __fastcall CreateTable(void);
	void __fastcall DeleteTable(void);
	void __fastcall EmptyTable(void);
	void __fastcall RenameTable(AnsiString NewTableName);
	bool __fastcall ImportTable(Db::TDataSet* SourceTable, AnsiString &Log, Db::TIndexDefs* aIndexDefs = (Db::TIndexDefs*)(0x0))/* overload */;
	bool __fastcall ImportTable(Db::TDataSet* SourceTable)/* overload */;
	bool __fastcall ExportTable(Db::TDataSet* DestinationTable, Sysutils::TProcedure CreateTablePointer, AnsiString &Log)/* overload */;
	bool __fastcall ExportTable(Db::TDataSet* DestinationTable, Sysutils::TProcedure CreateTablePointer)/* overload */;
	bool __fastcall CopyTable(AnsiString NewTableName, AnsiString &Log, bool &Continue, AnsiString DestDatabaseFileName = "", AnsiString DestDatabasePassword = "", bool IgnoreErrors = false, bool OverwriteExistingTable = false, bool CopyIndexes = true, int MinProgress = 0x0, int MaxProgress = 0x64)/* overload */;
	void __fastcall CopyTable(AnsiString NewTableName, AnsiString DestDatabaseFileName = "", AnsiString DestDatabasePassword = "")/* overload */;
	void __fastcall BatchMove(TABSDataSet* SourceTableOrQuery, Abstypes::TABSBatchMoveType MoveType, AnsiString DstTableIndexNameToIdentifyEqualRecords = "");
	bool __fastcall RestructureTable(AnsiString &Log)/* overload */;
	bool __fastcall RestructureTable(void)/* overload */;
	AnsiString __fastcall ExportToSQL()/* overload */;
	void __fastcall ExportToSQL(Classes::TStream* Stream)/* overload */;
	void __fastcall ExportToSQL(AnsiString FileName)/* overload */;
	void __fastcall RenameField(AnsiString FieldName, AnsiString NewFieldName)/* overload */;
	void __fastcall AddIndex(const AnsiString Name, const AnsiString Fields, Db::TIndexOptions Options, const AnsiString DescFields = "", const AnsiString CaseInsFields = "");
	void __fastcall DeleteIndex(const AnsiString Name);
	void __fastcall DeleteAllIndexes(void);
	
protected:
	void __fastcall ValidateAndRepairMostUpdatedAndRecordPageIndex(void);
	void __fastcall CheckSetKeyMode(void);
	char * __fastcall GetKeyBuffer(Abstypes::TABSKeyIndex KeyIndex);
	bool __fastcall GetKeyExclusive(void);
	int __fastcall GetKeyFieldCount(void);
	void __fastcall SetKeyExclusive(bool Value);
	void __fastcall SetKeyFieldCount(int Value);
	void __fastcall SetKeyBuffer(Abstypes::TABSKeyIndex KeyIndex, bool Clear);
	void __fastcall SetKeyFields(Abstypes::TABSKeyIndex KeyIndex, System::TVarRec const * Values, const int Values_Size);
	void __fastcall PostKeyBuffer(bool Commit);
	
public:
	bool __fastcall FindKey(System::TVarRec const * KeyValues, const int KeyValues_Size);
	void __fastcall FindNearest(System::TVarRec const * KeyValues, const int KeyValues_Size);
	bool __fastcall GotoKey(void);
	void __fastcall GotoNearest(void);
	void __fastcall EditKey(void);
	void __fastcall SetKey(void);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -