Sign in Join
FPDoc Onlineexperiment

TCustomBufDataset class

In unit BufDataset

Ancestor class for a database-aware buffered dataset.

Declaration

pascal
TCustomBufDataset = class(TDBDataset)

Inheritance

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

Descends from it: TBufDataset TCustomSQLQuery

Description

TCustomBufDataset is a TDBDataset descendant that implements the ancestor class for a database-aware buffered dataset. TCustomBufDataset 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. TCustomBufDataset 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 descendant, it offers access to many of the database features supported in the FCL DB package. As a TDataset descendant, it also offers access to familiar navigation and data handling methods in the ancestor class. TCustomBufDataset 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.

Do not create instances of TCustomBufDataset. Use the TBufDataset descendant instead.

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

RefreshingprotectedIndicates if the Refresh method has been called but has not completed.
ChangeCountpublicNumber of pending changes for the dataset.
MaxIndexesCountpublicMaximum number of indexes available in the dataset.
ReadOnlypublicIndicates if records can be added, deleted, or modified in the dataset.
ManualMergeChangeLogpublicIndicates if the update change log can be manually merged.
FileNamepublishedFile name on the local file system used to load or store the dataset.
PacketRecordspublishedNumber of records allowed in a data packet handled by the packet reader.
IndexDefspublishedIndex definitions for the dataset.
IndexNamepublishedName of the selected index for the dataset.
IndexFieldNamespublishedField names included in the custom index.
UniDirectionalpublishedIndicates if the dataset is for uni-directional navigation only.

Methods

DefaultReadFileFormatprotected
DefaultWriteFileFormatprotected
DefaultPacketClassprotected
CreateDefaultPacketReaderprotected
SetPacketRecordsprotectedSets the value for the PacketRecords property.
SetRecNoprotectedSets the value for the RecNo property.
GetRecNoprotectedGets the value for the RecNo property.
GetChangeCountprotectedGets the value for the ChangeCount property.
AllocRecordBufferprotectedAllocates resources for a record buffer.
FreeRecordBufferprotectedFrees resources allocated for the specified record buffer.
ClearCalcFieldsprotectedClears calculated fields in the specified record buffer.
InternalInitRecordprotectedPerforms actions needed to initialize the buffer for a record in the dataset.
GetCanModifyprotectedGets the value for the CanModify property.
GetRecordprotectedGets the record buffer for the record at the specified relative position.
DoBeforeCloseprotectedPerforms actions needed prior to closing the dataset.
InternalInitFieldDefsprotectedPerforms actions needed to initialize field definitions for the dataset.
InternalOpenprotectedPerforms actions needed to open the dataset.
InternalCloseprotectedPerforms actions needed to close the dataset.
GetRecordSizeprotectedGets the value for the RecordSize property.
InternalPostprotectedPerforms actions needed to post a record to the dataset.
InternalCancelprotectedPerforms actions needed to cancel a pending update in the dataset.
InternalDeleteprotectedPerforms actions needed to delete the current record in the dataset.
InternalFirstprotectedPerforms actions needed to move to the first record in the dataset.
InternalLastprotectedPerforms actions needed to move to the last record in the dataset.
InternalSetToRecordprotectedMoves the dataset to the specified record buffer.
InternalGotoBookmarkprotectedPerforms actions needed to move to the specified Bookmark in the dataset.
SetBookmarkDataprotectedStores the specified Bookmark data to a record buffer.
SetBookmarkFlagprotectedStores the specified Bookmark flag value to a record buffer.
GetBookmarkDataprotectedGets bookmark data from the specified record buffer.
GetBookmarkFlagprotectedGets Bookmark flag data from the specified record buffer.
IsCursorOpenprotectedIndicates if the cursor for the dataset has been opened.
GetRecordCountprotectedGets the value for the RecordCount property.
ApplyRecUpdateprotectedRaises an exception. ApplyRecUpdate is not supported in TCustomBufDataset and descendent classes.
ApplyRecUpdateExprotected
SetOnUpdateErrorprotectedSets the value for the OnUpdateError property.
SetFilterTextprotectedSets the value in the Filter property.
SetFilteredprotectedSets the value in the Filtered property.
InternalRefreshprotectedPerforms actions needed to refresh records in the dataset.
DataEventprotectedTriggers an event when the dataset or its data is modified.
GetNewBlobBufferprotectedCreates a new Blob buffer and adds it to the internal Blob buffers member.
GetNewWriteBlobBufferprotectedCreates a new Blob update buffer and adds it to the internal list.
FreeBlobBufferprotectedFrees resources allocated to the specified Blob buffer.
InternalAddIndexprotectedPerforms actions needed to add an index to the dataset.
BeforeRefreshOpenCursorprotectedAn empty implementation in TCustomBufDataset.
DoFilterRecordprotectedPerforms actions needed to filter records in the dataset.
SetReadOnlyprotectedSets the value in the ReadOnly property.
IsReadFromPacketprotectedIndicates if dataset content was read from a data packet reader or file.
getnextpacketprotectedReads and applies the next data packet from the data packet reader.
GetPacketReaderprotectedGets a Data Packet Reader using the specified data format for the dataset.
FetchprotectedAn empty implementation in TCustomBufDataset.
LoadFieldprotectedAn empty implementation in TCustomBufDataset.
LoadBlobIntoBufferprotectedLoads a Blob buffer for the specified field into the current record buffer.
DoLocateprotected
CreatepublicConstructor for the class instance.
GetFieldDatapublicGet the data for a field.
SetFieldDatapublicStore the data for a field.
ApplyUpdatespublicApplies pending updates to the dataset.
MergeChangeLogpublicFrees update buffers and Blob update buffer allocated for the dataset.
RevertRecordpublicReverts the current record to its original (un-edited) values.
CancelUpdatespublicCancels pending updates in the dataset.
DestroypublicDestructor for the class instance.
LocatepublicLocates the first record with fields having the specified values.
LookuppublicGets values from the first record with fields that match the search condition.
UpdateStatuspublicGets the update status for the current record in the dataset.
CreateBlobStreampublicCreates a Blob stream for the specified field with the given permissions.
AddIndexpublicAdds an index definition to the dataset.
ClearIndexespublicClears index storage in the dataset.
SetDatasetPacketpublicRetrieves and applies the data packet with the content for the dataset.
GetDatasetPacketpublicBuilds a data packet representing the content in the buffered dataset.
LoadFromStreampublicLoads the dataset from the specified stream using the given data format.
SaveToStreampublicSaves the dataset to the specified stream using the given data format.
LoadFromFilepublicLoads the dataset from the specified file using the given format.
SaveToFilepublicSaves the dataset to the specified file using the given data format.
CreateDatasetpublicCreates the dataset using its field definitions or bound fields.
ClearpublicClears the content in the dataset.
BookmarkValidpublicDetermines if the specified Bookmark is valid for the dataset.
CompareBookmarkspublicGets the relative sort order for the specified Bookmarks.
CopyFromDatasetpublicLoads field definitions and optional data from another dataset.

Events

OnUpdateErrorpublishedEvent handler signalled when an error occurs while updating records.

Inherited

From TDBDataset (5)

CheckDatabase DataBase SetDatabase SetTransaction Transaction

From TDataSet (206)

ActivateBuffers Active ActiveBuffer ActiveRecord AfterCancel AfterClose AfterDelete AfterEdit AfterInsert AfterOpen AfterPost AfterRefresh AfterScroll Append AppendRecord AutoCalcFields BeforeCancel BeforeClose BeforeDelete BeforeEdit BeforeInsert BeforeOpen BeforePost BeforeRefresh BeforeScroll 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 FieldDefs FieldDefsClass Fields FieldsClass FieldValues Filter Filtered 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 OnCalcFields OnDeleteError OnEditError OnFilterRecord OnNewRecord OnPostError 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.