Unit msebufdataset

Description

This item has no description.

Overview

Classes, Interfaces, Objects and Records

Name Description
Record fieldinfo_0ty  
Record fieldinfobasety  
Record fieldinfoextty  
Record fieldinfoty  
Record fielddataty  
Record blobcacheinfoty  
Record blobinfoty  
Record blobstreamfixinfoty  
Record blobstreaminfoty  
Record recheaderty  
Record intheaderty  
Record intrecordty  
Record bookmarkdataty  
Record bufbookmarkty  
Record dsheaderty  
Record dsrecordty  
Record indexty  
Record reclogheader32ty  
Record reclogheaderty  
Record updatelogheader32ty  
Record updatelogheaderty  
Record logbufferheader32ty  
Record logbufferheaderty  
Class tbufstreamwriter  
Class tbufstreamreader  
Class tblobbuffer  
Class tblobcopy  
Class tindexfield  
Class tindexfields  
Record indexfieldinfoty  
Class tlocalindex Warning: iterating with next in a loop that also posts changes to a field that belongs to the currently active local index is unsafe — posting such a change reorders the record within that index, so the iteration can skip or revisit records.
Class tlocalindexes  
Record recupdateinfoty  
Record recupdatebufferty  
Interface iblobchache  
Class ecurrentvalueaccess  
Class eapplyerror  
Record lookupdataty  
Record lookupfieldinfoty  
Class tmsebufdataset Keeps three buffers: the record buffer holds all fetched records (fkdata and fkinternalcalc field values — see oninternalcalcfields); the update buffer, managed by this class, holds a copy of a record's original values as soon as it is first modified/inserted/deleted by Post, used by applyupdates to build the update statements and by cancelupdates (all pending records) or cancelupdate (the current record only) to restore the record buffer; the edit buffer, managed by the inherited tdataset, is the display/edit window used by the connected widgets and grids (as many rows as the largest connected grid needs) and is also where fkcalculated field values, computed on the fly by OnCalcFields, live — unlike fkdata/fkinternalcalc fields, they are not part of the record buffer.

Functions and Procedures

function getfieldflag(nullmask: pbyte; const x: integer): boolean;
procedure setfieldflag(nullmask: pbyte; const x: integer);
procedure clearfieldflag(nullmask: pbyte; const x: integer);
procedure alignfieldpos(var avalue: integer);

Types

pfieldinfobasety = ˆfieldinfobasety;
fieldinfoarty = array of fieldinfoty;
blobcacheinfoarty = array of blobcacheinfoty;
pblobinfoty = ˆblobinfoty;
blobinfoarty = array of blobinfoty;
pblobinfoarty = ˆblobinfoarty;
precheaderty = ˆrecheaderty;
pprecheaderty = ˆprecheaderty;
pintrecordty = ˆintrecordty;
ppintrecordty = ˆpintrecordty;
pbookmarkdataty = ˆbookmarkdataty;
pbufbookmarkty = ˆbufbookmarkty;
pdsrecordty = ˆdsrecordty;
pindexty = ˆindexty;
logflagty = (...);
updatekindty = (...);
resolverresponsety = (...);
resolverresponsesty = set of resolverresponsety;
updateerroreventty = procedure( const sender: tmsebufdataset; var e: edatabaseerror; const updatekind: tupdatekind; var response: resolverresponsesty) of object;
indexfieldoptionty = (...);
indexfieldoptionsty = set of indexfieldoptionty;
localindexoptionty = (...);
localindexoptionsty = set of localindexoptionty;
intrecordpoaty = array[0..0] of pintrecordty;
pintrecordpoaty = ˆintrecordpoaty;
indexfieldinfoarty = array of indexfieldinfoty;
indexcomparefuncty = function (l,r: pintrecordty; const alastindex: integer; const apartialstring: boolean): integer of object;
bufdataseteventty = procedure(const sender: tmsebufdataset) of object;
recupdateflagty = (...);
recupdateflagsty = set of recupdateflagty;
recupdateinfoarty = array of recupdateinfoty;
precupdatebufferty = ˆrecupdatebufferty;
recupdatebufferarty = array of recupdatebufferty;
bufdatasetstatety = (...);
bufdatasetstatesty = set of bufdatasetstatety;
bufdatasetstate1ty = (...);
bufdatasetstates1ty = set of bufdatasetstate1ty;
internalcalcfieldseventty = procedure(const sender: tmsebufdataset; const fetching: boolean) of object;
getbmvalueeventty = procedure (const afield: tfield; const bm: bookmarkdataty; var adata: lookupdataty) of object;
lookupfieldinfoarty = array of lookupfieldinfoty;
filterediteventty = procedure(const sender: tmsebufdataset; const akind: filtereditkindty) of object;
bufdatasetarty = array of tmsebufdataset;
bufdatasetoptionty = (...);
bufdatasetoptionsty = set of bufdatasetoptionty;

Constants

defaultpacketrecords = -1;
integerindexfields = [ftsmallint,ftinteger,ftword,ftboolean];
largeintindexfields = [ftlargeint];
floatindexfields = [ftfloat,ftdatetime,ftdate,fttime];
currencyindexfields = [ftcurrency,ftbcd];
stringindexfields = [ftstring,ftfixedchar];
guidindexfields = [ftguid];
indexfieldtypes = integerindexfields+largeintindexfields+floatindexfields+ currencyindexfields+stringindexfields+guidindexfields;
dsbuffieldkinds = [fkcalculated,fklookup];
bufferfieldkinds = [fkdata];
dscheckfilter = ord(high(tdatasetstate)) + 1;
bufstreambuffersize = 4096;
intheadersize = sizeof(intheaderty);
dsheadersize = sizeof(dsheaderty);
defaultbufdatasetoptions = [];
oldbdsoptions = [ bdo_postsavepoint,bdo_deletesavepoint, bdo_cancelupdateonerror,bdo_cancelupdatesonerror, bdo_cancelupdateondeleteerror, bdo_editonapplyerror, bdo_restoreupdateonsavepointrollback, bdo_noapply,bdo_autoapply, bdo_autocommitret,bdo_autocommit, bdo_refreshafterapply,bdo_recnoapplyrefresh, bdo_refreshtransaction, bdo_notransactionrefresh,bdo_recnotransactionrefresh, bdo_noprepare, bdo_cacheblobs, bdo_offline, bdo_local ];

Description

Functions and Procedures

function getfieldflag(nullmask: pbyte; const x: integer): boolean;

This item has no description.

procedure setfieldflag(nullmask: pbyte; const x: integer);

This item has no description.

procedure clearfieldflag(nullmask: pbyte; const x: integer);

This item has no description.

procedure alignfieldpos(var avalue: integer);

This item has no description.

Types

pfieldinfobasety = ˆfieldinfobasety;

This item has no description.

fieldinfoarty = array of fieldinfoty;

This item has no description.

blobcacheinfoarty = array of blobcacheinfoty;

This item has no description.

pblobinfoty = ˆblobinfoty;

This item has no description.

blobinfoarty = array of blobinfoty;

This item has no description.

pblobinfoarty = ˆblobinfoarty;

This item has no description.

precheaderty = ˆrecheaderty;

This item has no description.

pprecheaderty = ˆprecheaderty;

This item has no description.

pintrecordty = ˆintrecordty;

This item has no description.

ppintrecordty = ˆpintrecordty;

This item has no description.

pbookmarkdataty = ˆbookmarkdataty;

This item has no description.

pbufbookmarkty = ˆbufbookmarkty;

This item has no description.

pdsrecordty = ˆdsrecordty;

This item has no description.

pindexty = ˆindexty;

This item has no description.

logflagty = (...);

This item has no description.

Values
  • lf_end
  • lf_rec
  • lf_update
  • lf_cancel
  • lf_apply
  • lf_drop
updatekindty = (...);

This item has no description.

Values
  • uk_modify = ord(ukmodify)
  • uk_insert = ord(ukinsert)
  • uk_delete = ord(ukdelete)
  • uk_modifyinupdate
resolverresponsety = (...);

This item has no description.

Values
  • rr_abort
  • rr_quiet
  • rr_revert
  • rr_again
  • rr_applied
  • rr_skipped
resolverresponsesty = set of resolverresponsety;

This item has no description.

updateerroreventty = procedure( const sender: tmsebufdataset; var e: edatabaseerror; const updatekind: tupdatekind; var response: resolverresponsesty) of object;

This item has no description.

indexfieldoptionty = (...);

Set ifo_caseinsensitive on an index field for a case-insensitive index; for a partial (prefix) search on the last field of an index, use tlocalindex.find's partialstring parameter — it only has an effect if that last field is a string field. For best performance with such lookups, prefer a lookup buffer over a local index when possible.

ifo_desc reverses the sort order of this field within the index; tlocalindex.desc (lio_desc) reverses the sort order of the whole index. Setting both on the same field cancels out, giving that field's normal (ascending) order again.

Values
  • ifo_desc
  • ifo_caseinsensitive
  • ifo_natural
indexfieldoptionsty = set of indexfieldoptionty;

This item has no description.

localindexoptionty = (...);

This item has no description.

Values
  • lio_desc
  • lio_default
  • lio_quicksort
localindexoptionsty = set of localindexoptionty;

This item has no description.

intrecordpoaty = array[0..0] of pintrecordty;

This item has no description.

pintrecordpoaty = ˆintrecordpoaty;

This item has no description.

indexfieldinfoarty = array of indexfieldinfoty;

This item has no description.

indexcomparefuncty = function (l,r: pintrecordty; const alastindex: integer; const apartialstring: boolean): integer of object;

This item has no description.

bufdataseteventty = procedure(const sender: tmsebufdataset) of object;

This item has no description.

recupdateflagty = (...);

This item has no description.

Values
  • ruf_applied
  • ruf_error
  • ruf_append
  • ruf_inupdate
recupdateflagsty = set of recupdateflagty;

This item has no description.

recupdateinfoarty = array of recupdateinfoty;

This item has no description.

precupdatebufferty = ˆrecupdatebufferty;

This item has no description.

recupdatebufferarty = array of recupdatebufferty;

This item has no description.

bufdatasetstatety = (...);

This item has no description.

Values
  • bs_opening
  • bs_loading
  • bs_fetching
  • bs_displaydata
  • bs_applying
  • bs_recapplying
  • bs_curvaluemodified
  • bs_curvalueset
  • bs_connected
  • bs_hasindex
  • bs_fetchall
  • bs_initinternalcalc
  • bs_blobsfetched
  • bs_blobscached
  • bs_blobssorted
  • bs_hasvalidindex
  • bs_editing
  • bs_append
  • bs_internalcalc
  • bs_startedit
  • bs_utf8
  • bs_hasfilter
  • bs_visiblerecordcountvalid
  • bs_refreshing
  • bs_restorerecno
  • bs_idle
  • bs_noautoapply
  • bs_refreshinsert
  • bs_refreshupdate
  • bs_refreshinsertindex
  • bs_refreshupdateindex
  • bs_inserttoupdate
bufdatasetstatesty = set of bufdatasetstatety;

This item has no description.

bufdatasetstate1ty = (...);

This item has no description.

Values
  • bs1_needsresync
  • bs1_inupdatechanged
  • bs1_lookupnotifying
  • bs1_lookupnotifypending
  • bs1_posting
  • bs1_recordupdating
  • bs1_deferdeleterecupdatebuffer
  • bs1_restoreupdate
  • bs1_onidleregistered
bufdatasetstates1ty = set of bufdatasetstate1ty;

This item has no description.

internalcalcfieldseventty = procedure(const sender: tmsebufdataset; const fetching: boolean) of object;

This item has no description.

getbmvalueeventty = procedure (const afield: tfield; const bm: bookmarkdataty; var adata: lookupdataty) of object;

This item has no description.

lookupfieldinfoarty = array of lookupfieldinfoty;

This item has no description.

filterediteventty = procedure(const sender: tmsebufdataset; const akind: filtereditkindty) of object;

This item has no description.

bufdatasetarty = array of tmsebufdataset;

This item has no description.

bufdatasetoptionty = (...);

If bdo_autoapply is set, applyupdates is called automatically after post. If bdo_autocommitret is also set, the transaction's commitretaining is called after applyupdates; this works well with Firebird (data cursors stay valid after commitretaining) but is more problematic with Postgres, which has no real commitretaining equivalent. bdo_autocommit does a plain commit instead, leaving no open write transaction after applyupdates — only one of bdo_autocommitret/bdo_autocommit can be set at a time.

Values
  • bdo_postsavepoint
  • bdo_deletesavepoint
  • bdo_cancelupdateonerror: If applying a record's update fails, bdo_cancelupdateonerror reverts that single record's modification; bdo_cancelupdatesonerror instead reverts all pending modifications, not just the failed record's.
  • bdo_cancelupdatesonerror
  • bdo_cancelupdateondeleteerror
  • bdo_editonapplyerror
  • bdo_restoreupdateonsavepointrollback
  • bdo_rollbackonupdateerror
  • bdo_noapply
  • bdo_autoapply
  • bdo_autoapplyexceptions
  • bdo_autocommitret
  • bdo_autocommit
  • bdo_refreshafterapply: Set bdo_refreshafterapply to refresh this query (only) after applyupdates — needed if it returns server-side calculated fields or is a join, so the fetched values reflect what was actually written; a lookup buffer is usually a better way to get related values without a refresh.
  • bdo_recnoapplyrefresh
  • bdo_refreshtransaction: By default, refresh (e.g. from tdbnavigator) only re-executes the query, which does not pick up changes committed by other sessions if the query's own transaction still sees an older snapshot. Set bdo_refreshtransaction to also refresh the transaction itself.
  • bdo_notransactionrefresh
  • bdo_recnotransactionrefresh
  • bdo_checkbrowsemodebylookupchange
  • bdo_noprepare
  • bdo_cacheblobs: Some backends (e.g. Postgres) do not support fetching a blob field's value lazily on demand; set bdo_cacheblobs to fetch and cache all blob values together with the rest of each record instead.
  • bdo_offline: bdo_offline disconnects from the database right after the initial fetch. Combined with a non-empty logfilename, a copy of the buffer is stored in that file and further changes are appended to it as a journal, so they are not lost even without a live connection.
  • bdo_local: bdo_local mode is meant for offline editing of a small dataset fetched from an SQL database, with modifications logged to disk and applied/committed to the server later (comparable to TClientDataset) — the whole data must fit in memory. The filter property uses server-side filtering (adds a WHERE clause) and does not work in bdo_local mode since there is no database connection; use onfilterrecord instead, which works in every mode. This is meant as a lightweight, temporary buffer for when the server connection is briefly unavailable, not as a real local database — use tsqlite3connection for that. The log file (logfilename) is a raw memory copy (string fields as UCS2, memo fields in the current locale encoding or UTF-8 if dso_utf8 is set); its format is not guaranteed to stay compatible across MSEgui versions.
bufdatasetoptionsty = set of bufdatasetoptionty;

This item has no description.

Constants

defaultpacketrecords = -1;

This item has no description.

integerindexfields = [ftsmallint,ftinteger,ftword,ftboolean];

This item has no description.

largeintindexfields = [ftlargeint];

This item has no description.

floatindexfields = [ftfloat,ftdatetime,ftdate,fttime];

This item has no description.

currencyindexfields = [ftcurrency,ftbcd];

This item has no description.

stringindexfields = [ftstring,ftfixedchar];

This item has no description.

guidindexfields = [ftguid];

This item has no description.

indexfieldtypes = integerindexfields+largeintindexfields+floatindexfields+ currencyindexfields+stringindexfields+guidindexfields;

This item has no description.

dsbuffieldkinds = [fkcalculated,fklookup];

This item has no description.

bufferfieldkinds = [fkdata];

This item has no description.

dscheckfilter = ord(high(tdatasetstate)) + 1;

This item has no description.

bufstreambuffersize = 4096;

This item has no description.

intheadersize = sizeof(intheaderty);

This item has no description.

dsheadersize = sizeof(dsheaderty);

This item has no description.

defaultbufdatasetoptions = [];

This item has no description.

oldbdsoptions = [ bdo_postsavepoint,bdo_deletesavepoint, bdo_cancelupdateonerror,bdo_cancelupdatesonerror, bdo_cancelupdateondeleteerror, bdo_editonapplyerror, bdo_restoreupdateonsavepointrollback, bdo_noapply,bdo_autoapply, bdo_autocommitret,bdo_autocommit, bdo_refreshafterapply,bdo_recnoapplyrefresh, bdo_refreshtransaction, bdo_notransactionrefresh,bdo_recnotransactionrefresh, bdo_noprepare, bdo_cacheblobs, bdo_offline, bdo_local ];

This item has no description.


Generated by PasDoc 1.0.4.