Sign in Join
FPDoc Onlineexperiment

TBufDataset class

In unit BufDataset

Implements a database-aware buffered dataset.

Declaration

pascal
TBufDataset = class(TCustomBufDataset)

Inheritance

  1. TBufDataset
  2. TCustomBufDataset
  3. TDBDataset
  4. TDataSet
  5. TComponent
  6. TPersistent
  7. TObject

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

MaxIndexesCountpublishedMaximum number of indexes available in the dataset.
FieldDefspublishedDefinitions of available fields in the underlying database.
ActivepublishedIs the dataset open or closed.
AutoCalcFieldspublishedHow often should the value of calculated fields be calculated.
FilterpublishedFilter to apply to the data in memory.
FilteredpublishedIs the filter active or not.
ReadOnlypublishedIndicates if records can be added, deleted, or modified in the dataset.
AfterCancelpublishedEvent triggered after a Cancel operation.
AfterClosepublishedEvent triggered after the dataset is closed.
AfterDeletepublishedEvent triggered after a successful Delete operation.
AfterEditpublishedEvent triggered after the dataset is put in edit mode.
AfterInsertpublishedEvent triggered after the dataset is put in insert mode.
AfterOpenpublishedEvent triggered after the dataset is opened.
AfterPostpublishedEvent called after changes have been posted to the underlying database.
AfterScrollpublishedEvent triggered after the cursor has changed position.
BeforeCancelpublishedEvent triggered before a Cancel operation.
BeforeClosepublishedEvent triggered before the dataset is closed.
BeforeDeletepublishedEvent triggered before a Delete operation.
BeforeEditpublishedEvent triggered before the dataset is put in edit mode.
BeforeInsertpublishedEvent triggered before the dataset is put in insert mode.
BeforeOpenpublishedEvent triggered before the dataset is opened.
BeforePostpublishedEvent called before changes are posted to the underlying database.
BeforeScrollpublishedEvent triggered before the cursor changes position.
CancelChangesOnRefreshpublished

Methods

InternalRefreshprotectedPerforms actions needed to refresh records in the dataset.

Events

OnCalcFieldspublishedEvent triggered when values for calculated fields must be computed.
OnDeleteErrorpublishedEvent triggered when a delete operation fails.
OnEditErrorpublishedEvent triggered when an edit operation fails.
OnFilterRecordpublishedEvent triggered to filter records.
OnNewRecordpublishedEvent triggered when a new record is created.
OnPostErrorpublishedEvent 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.