TBufDataset class
Implements a database-aware buffered dataset.
Declaration
TBufDataset = class(TCustomBufDataset)Inheritance
Description
TBufDataset is a
TCustomBufDataset descendant that implements a database-aware buffered dataset. TBufDataset is an in-memory dataset that can be used as a local stand-alone dataset, or it can be used as a local buffer for updates applied to a remote dataset. TBufDataset implements many features similar to those in TClientDataset in Delphi. However, it is
not meant to be code or function compatible with TClientDataset. It is designed to provide management of the buffers used to access record data, and is used as the ancestor for classes like TSQLQuery and TRESTBufDataset.
As a TDBDataset descendent, it offers access to many of the database features supported in the FCL DB package. As a TDataset descendent, it also offers access to familiar navigation and data handling methods in the ancestor class. TBufDataset has features that allow local storage and retrieval of field definitions and record data. In addition, facilities are provided that allow local indexing of record data in the dataset. There is a comprehensive parser/expression evaluator available that allows complete support for Filters in the dataset.
TBufDataset sets the visibility for properties and methods defined in the ancestor class.
Additional information about using TBufDataset can be found on the Lazarus Wiki at: How to write in-memory database applications in Lazarus/FPC (TBufDataset).
See also
Properties
MaxIndexesCount | published | Maximum number of indexes available in the dataset. |
FieldDefs | published | Definitions of available fields in the underlying database. |
Active | published | Is the dataset open or closed. |
AutoCalcFields | published | How often should the value of calculated fields be calculated. |
Filter | published | Filter to apply to the data in memory. |
Filtered | published | Is the filter active or not. |
ReadOnly | published | Indicates if records can be added, deleted, or modified in the dataset. |
AfterCancel | published | Event triggered after a Cancel operation. |
AfterClose | published | Event triggered after the dataset is closed. |
AfterDelete | published | Event triggered after a successful Delete operation. |
AfterEdit | published | Event triggered after the dataset is put in edit mode. |
AfterInsert | published | Event triggered after the dataset is put in insert mode. |
AfterOpen | published | Event triggered after the dataset is opened. |
AfterPost | published | Event called after changes have been posted to the underlying database. |
AfterScroll | published | Event triggered after the cursor has changed position. |
BeforeCancel | published | Event triggered before a Cancel operation. |
BeforeClose | published | Event triggered before the dataset is closed. |
BeforeDelete | published | Event triggered before a Delete operation. |
BeforeEdit | published | Event triggered before the dataset is put in edit mode. |
BeforeInsert | published | Event triggered before the dataset is put in insert mode. |
BeforeOpen | published | Event triggered before the dataset is opened. |
BeforePost | published | Event called before changes are posted to the underlying database. |
BeforeScroll | published | Event triggered before the cursor changes position. |
CancelChangesOnRefresh | published |
Methods
InternalRefresh | protected | Performs actions needed to refresh records in the dataset. |
Events
OnCalcFields | published | Event triggered when values for calculated fields must be computed. |
OnDeleteError | published | Event triggered when a delete operation fails. |
OnEditError | published | Event triggered when an edit operation fails. |
OnFilterRecord | published | Event triggered to filter records. |
OnNewRecord | published | Event triggered when a new record is created. |
OnPostError | published | Event triggered when a post operation fails. |
Inherited
From TCustomBufDataset (87)
AddIndex AllocRecordBuffer ApplyRecUpdate ApplyRecUpdateEx ApplyUpdates BeforeRefreshOpenCursor BookmarkValid CancelUpdates ChangeCount Clear ClearCalcFields ClearIndexes CompareBookmarks CopyFromDataset Create CreateBlobStream CreateDataset CreateDefaultPacketReader DataEvent DefaultPacketClass DefaultReadFileFormat DefaultWriteFileFormat Destroy DoBeforeClose DoFilterRecord DoLocate Fetch FileName FreeBlobBuffer FreeRecordBuffer GetBookmarkData GetBookmarkFlag GetCanModify GetChangeCount GetDatasetPacket GetFieldData GetNewBlobBuffer GetNewWriteBlobBuffer getnextpacket GetPacketReader GetRecNo GetRecord GetRecordCount GetRecordSize IndexDefs IndexFieldNames IndexName InternalAddIndex InternalCancel InternalClose InternalDelete InternalFirst InternalGotoBookmark InternalInitFieldDefs InternalInitRecord InternalLast InternalOpen InternalPost InternalSetToRecord IsCursorOpen IsReadFromPacket LoadBlobIntoBuffer LoadField LoadFromFile LoadFromStream Locate Lookup ManualMergeChangeLog MergeChangeLog OnUpdateError PacketRecords Refreshing RevertRecord SaveToFile SaveToStream SetBookmarkData SetBookmarkFlag SetDatasetPacket SetFieldData SetFiltered SetFilterText SetOnUpdateError SetPacketRecords SetReadOnly SetRecNo UniDirectional UpdateStatus
From TDBDataset (5)
CheckDatabase DataBase SetDatabase SetTransaction Transaction
From TDataSet (179)
ActivateBuffers ActiveBuffer ActiveRecord AfterRefresh Append AppendRecord BeforeRefresh BindFields BlobFieldCount BlockReadNext BlockReadSize BOF Bookmark BookmarkAvailable BookmarkSize BufferCount Buffers CalcBuffer CalcFieldsSize CalculateFields Cancel CanModify CheckActive CheckBiDirectional CheckBrowseMode CheckInactive ClearBuffers ClearFields Close CloseBlob CloseCursor Constraints ControlsDisabled CreateFields CurrentRecord CursorPosChanged DataConvert DataSource DefaultFields Delete DestroyFields DisableControls DoAfterCancel DoAfterClose DoAfterDelete DoAfterEdit DoAfterInsert DoAfterOpen DoAfterPost DoAfterRefresh DoAfterScroll DoBeforeCancel DoBeforeDelete DoBeforeEdit DoBeforeInsert DoBeforeOpen DoBeforePost DoBeforeRefresh DoBeforeScroll DoOnCalcFields DoOnNewRecord Edit EnableControls EOF FieldByName FieldByNumber FieldCount FieldDefsClass Fields FieldsClass FieldValues FilterOptions FindField FindFirst FindLast FindNext FindPrior FindRecord First Found FreeBookmark FreeFieldBuffers GetBookmark GetBookmarkStr GetCalcFields GetChildren GetCurrentRecord GetDataSource GetDefaultBufferCount GetFieldClass GetfieldCount GetFieldList GetFieldNames GetFieldValues GetIndexDefs GetIsIndexField GetNextRecord GetNextRecords GetPriorRecord GetPriorRecords GotoBookmark InitFieldDefs InitFieldDefsFromFields InitRecord Insert InsertRecord InternalAddRecord InternalCalcFields InternalEdit InternalHandleException InternalInsert IsEmpty IsLinkedTo IsSequenced IsUniDirectional Last Loaded Modified MoveBy MyDataSourceCount MyDataSources Next Open OpenCursor OpenCursorcomplete Post Prior PSEndTransaction PSExecute PSExecuteStatement PSGetAttributes PSGetCommandText PSGetCommandType PSGetDefaultOrder PSGetIndexDefs PSGetKeyFields PSGetParams PSGetQuoteChar PSGetTableName PSGetUpdateException PSInTransaction PSIsSQLBased PSIsSQLSupported PSReset PSSetCommandText PSSetParams PSStartTransaction PSUpdateRecord RecalcBufListSize RecNo RecordCount RecordSize Refresh RefreshInternalCalcFields RestoreState Resync SetActive SetBookmarkStr SetBufListSize SetChildOrder SetCurrentRecord SetDefaultFields SetFields SetFieldValues SetFilterOptions SetFound SetModified SetName SetOnFilterRecord SetState SetTempState SetUniDirectional SparseArrays State TempBuffer Translate UpdateCursorPos UpdateIndexDefs UpdateRecord
From TComponent (70)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetDesigning SetDesignInstance SetInline SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
