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

MakeBlobFromBytes

Loads a bytes into a Blob field (WideMemo, Memo, etc.).

function MakeBlobFromBytes(Blob: TBytes): pointer

Parameters:

  • Blob: given bytes

SetAnsiString

Loads an ANSI string from the buffer into the field.

procedure SetAnsiString(NativeBuf: Pointer; FldNo: integer; const Value: ROAnsiString)

Parameters:

  • NativeBuf: buffer
  • FldNo: field number
  • Value: value

SetNullMask

Marks given field value as Null.

procedure SetNullMask(Buffer: PByte; FldNo: integer; const Value: boolean)

Parameters:

  • Buffer: 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(NativeBuf: Pointer; FldNo: integer; const Value: Unicodestring)

Parameters:

  • NativeBuf: buffer
  • FldNo: field number
  • Value: value