IDAMemDatasetBatchAdding

Overview

TDAMemDataTable implements the IDAMemDatasetBatchAdding interface to significantly speed up the loading of records. It is used internally, but if you want to develop your own dataset class (which implements IDADataset), you can also implement IDAMemDatasetBatchAdding for the same purpose.

Location

Implemented in

Required Methods


AddRecordsfromList

Loads records from a previously prepared list of records.

procedure AddRecordsfromList(AList: TRecordsList; AppendMode: Boolean)

Parameters:

  • AList: source list
  • AppendMode: current mode

AllocRecordBuffer

Initializes the internal buffer.

function AllocRecordBuffer: PByte

FreeRecordBuffer

Frees memory allocated by the AllocRecordBuffer.

procedure FreeRecordBuffer(var Buffer: PByte)

Parameters:

  • Buffer: buffer

GetFieldNativeBuffer

Allocates memory for reading a field value.

function GetFieldNativeBuffer(Buffer: PByte; FldNo: integer): Pointer

Parameters:

  • Buffer: buffer
  • FldNo: field number

GetFieldNo

Returns the order number for a field in the record.

function GetFieldNo(AField: TField): integer

Parameters:

  • AField: given field

GetFieldOffsets

function GetFieldOffsets: TOffsetArray

SetAnsiString

Loads an ANSI string from the buffer into the field.

procedure SetAnsiString(var Buffer: TBytes; FldNo: integer; const Value: ROAnsiString)

Parameters:

  • Buffer:
  • FldNo: field number
  • Value: value

SetStreamerMode

Sets special mode that is used at batch record adding

procedure SetStreamerMode(AStreamerMode: Boolean)

Parameters:

  • AStreamerMode: value

SetWideString

Loads a wide string from the buffer into the field.

procedure SetWideString(var Buffer: TBytes; FldNo: integer; const Value: Unicodestring)

Parameters:

  • Buffer:
  • FldNo: field number
  • Value: value