lazarus_db library
Datasets, fields and data sources: a Dart port of the Free Pascal db
unit (TDataSet, TField, TDataSource).
Classes
- TAutoIncField
- An auto-increment integer field.
- TBCDField
- A fixed-point decimal field.
- TBinaryField
- Base of fixed-size binary fields.
- TBlobField
- A binary large object field.
- TBooleanField
- A true/false field.
- TBoolRef
-
A mutable bool passed by reference (Pascal
varparameter). - TBytesField
- A fixed-size binary field.
- TCheckConstraint
- A record-level constraint.
- TCheckConstraints
- The TCheckConstraints of a dataset.
- TCollection
-
A list of TCollectionItems of one class (FPC
TCollection). - TCollectionItem
- An item of a TCollection.
- TComponent
-
Base of named, owned components such as datasets and connections (FPC
TComponent). - TCurrencyField
- A money field.
- TCustomConnection
- Base of database connections.
- TDataActionRef
- A mutable TDataAction passed by reference.
- TDatabase
- A database connection that owns datasets and transactions.
- TDataLink
- Connects a control or detail dataset to a TDataSource.
- TDataSet
-
A set of records with a cursor (FPC
TDataSet). - TDataSetEnumerator
- Iterates over the records of a TDataSet.
- TDataSource
-
Connects data-aware controls to a TDataSet (WML
<datasource>). - TDateField
- A date field.
- TDateTimeField
- A date and time field.
- TDateTimeRec
- A date/time value as stored in a record buffer.
- TDBDataset
- A dataset bound to a TDatabase and a TDBTransaction.
- TDBTransaction
- Base of database transactions.
- TDefCollection
- A collection of named definitions belonging to a dataset.
- TDetailDataLink
- A TDataLink used by a detail dataset.
- TField
-
One column of a TDataSet; reads and writes the current record (FPC
TField). - TFieldDef
-
Definition of one field of a dataset: name, type, size (FPC
TFieldDef). - TFieldDefs
- The TFieldDefs of a dataset.
- TFields
- The fields of a dataset, by position and by name.
- TFieldsEnumerator
- Iterates over the TFields of a TFields.
- TFloatField
- A floating-point field.
- TFMTBCDField
- A high-precision decimal field.
- TGraphicField
- A blob field holding an image.
- TGuidField
- A field holding a GUID string.
- TIndexDef
- Definition of one index of a dataset.
- TIndexDefs
- The TIndexDefs of a dataset.
- TIntegerField
-
An integer field; fractional values are rounded like Delphi
Round(half to even). - TIntRef
-
A mutable int passed by reference (Pascal
varparameter). - TLargeintField
- A 64-bit integer field.
- TLongintField
- A 32-bit integer field.
- TLookupList
- Cache of the values of a lookup field.
- TLookupListRec
- One cached key/value pair of a lookup field.
- TMasterDataLink
-
Links a detail dataset to its master (WML
masterfields). - TMasterParamsDataLink
- A TMasterDataLink that fills the detail query's parameters from the master.
- TMemoField
- A long text field.
- TMemoryStream
- A TStream kept in memory; used for blob fields.
- TNamedItem
- A TCollectionItem with a name.
- TNumericField
- Base of number fields; adds display and edit formats.
- TOwnedCollection
- A TCollection that knows its owner.
- TParam
-
One parameter of a query (
:namein the SQL). - TParams
- The parameters of a query.
- TParamsEnumerator
- Iterates over the TParams of a TParams.
- TPersistent
-
Base of objects that can be assigned to each other (FPC
TPersistent). - TRecordBuffer
- A record buffer of a dataset.
- TSmallintField
- A 16-bit integer field.
- TStream
-
Abstract byte stream (FPC
TStream). - TStringField
- A text field.
- TStringList
-
A TStrings stored in memory (FPC
TStringList). - TStringRef
-
A mutable string passed by reference (Pascal
varparameter). - TStrings
-
Abstract list of strings with
name=valuesupport (FPCTStrings). - TTimeField
- A time-of-day field.
- TTimeStamp
- Date and time split into day and milliseconds.
- TValueBuffer
- Raw value of a field as read from or written to a record buffer.
- TVarBytesField
- A variable-size binary field.
- TVariantField
- A field that holds any kind of value.
- TWideMemoField
- A long Unicode text field.
- TWideStringField
- A Unicode text field.
- TWordField
- An unsigned 16-bit integer field.
Enums
- TAlignment
- Horizontal alignment of a field's text.
- TBlobStreamMode
- Whether a blob stream is opened for reading or writing.
- TBookmarkFlag
- Position flag of a record buffer (current, BOF, EOF, inserted).
- TComponentStateItem
-
Flags describing a component's life-cycle state, e.g. loading or destroying (FPC
TComponentState). - TDataAction
- What to do after a dataset error: fail, abort or retry.
- TDataEvent
- Notifications a TDataSet sends to its TDataSources and data links.
- TDataSetState
-
Edit state of a TDataSet (FPC
TDataSetState). - TFieldAttribute
- Extra attributes of a field definition (hidden, read-only, required…).
- TFieldKind
- Where a field's value comes from: data, calculated, lookup….
- TFieldType
-
Data type of a field (FPC
TFieldType). - TFilterOption
- Options of a dataset filter.
- TFloatFormat
- Number format used when a float is shown as text.
- TGetMode
- Which record to fetch: current, next or prior.
- TGetResult
- Result of a record fetch: OK, BOF, EOF or error.
- TIndexOption
- Options of an index (primary, unique, descending…).
- TLocateOption
- Options of TDataSet.locate: case-insensitive, partial key.
- TOperation
-
Whether a component is being inserted into or removed from its owner (FPC
TOperation). - TParamStyle
-
How parameters are written in SQL (
:name,?…). - TParamType
- Direction of a query parameter (input, output…).
- TProviderFlag
- How a field takes part in generated SQL (key, update, where).
- TPSCommandType
- Kind of command a provider runs.
- TResolverResponse
- What to do after an update error.
- TResyncModeItem
- Options for re-synchronising a dataset's buffers.
- TSeekOrigin
- Origin of a stream seek: beginning, current position or end.
- TSQLParseOption
- Options used when parameters are extracted from SQL.
- TUpdateAction
- What to do after an update error in cached updates.
- TUpdateKind
- Kind of change being applied: modify, insert or delete.
- TUpdateMode
- Which fields identify a record in generated UPDATE / DELETE statements.
- TUpdateStatus
- Whether a cached record was modified, inserted or deleted.
Constants
- cpACP → const int
- cpUTF16 → const int
- cpUTF8 → const int
- currencyDecimals → const int
- dateDelta → const int
- decimalSeparator → const String
- defaultBufferCount → const int
-
dsEditModes
→ const Set<
TDataSetState> - dsMaxBufferCount → const int
- dsMaxStringSize → const int
-
dsWriteModes
→ const Set<
TDataSetState> -
fieldTypeNames
→ const List<
String> -
ftBlobTypes
→ const Set<
TFieldType> - longTimeFormat → const String
- maxFMTBcdFractionSize → const int
- SActiveDataset → const String
- SApplyRecNotSupported → const String
- SBadParamFieldType → const String
- SCantSetAutoIncFields → const String
- SCommitRetaining → const String
- SCommitting → const String
- SConnected → const String
- SDatasetEmpty → const String
- SDatasetReadOnly → const String
- SDatasetRegistered → const String
- SDBCreateDropFailed → const String
- SDeletedRecord → const String
- SDuplicateFieldName → const String
- SDuplicateName → const String
- SErrApplyUpdBeforeRefresh → const String
- SErrAssTransaction → const String
- SErrCircularDataSourceReferenceNotAllowed → const String
- SErrColumnNotFound → const String
- SErrConnTransactionnSet → const String
- SErrDatabasenAssigned → const String
- SErrDisconnectedPacketRecords → const String
- SErrFailedToFetchReturningResult → const String
- SErrFailedToUpdateRecord → const String
- SErrImplicitConnect → const String
- SErrImplicitNoRollBack → const String
- SErrImplictTransactionStart → const String
- SErrIndexBasedOnInvField → const String
- SErrIndexBasedOnUnkField → const String
- SErrIndexResultTooLong → const String
- SErrNoDatabaseAvailable → const String
- SErrNoDatabaseName → const String
- SErrNoDataset → const String
- SErrNoFieldsDefined → const String
- SErrNoImplicitTransaction → const String
- SErrNoKeyFieldForRefreshClause → const String
- SErrNoSelectStatement → const String
- SErrNoStatement → const String
- SErrNotASQLConnection → const String
- SErrNotASQLQuery → const String
- SErrRefreshEmptyResult → const String
- SErrRefreshNotSingleton → const String
- SErrTransactionnSet → const String
- SErrTransAlreadyActive → const String
- SErrUnknownConnectorType → const String
- SFieldError → const String
- SFieldIndexError → const String
- SFieldIsNull → const String
- SFieldNotFound → const String
- SFieldValueError → const String
- shortDateFormat → const String
- SInactiveDataset → const String
- SIndexFieldMissing → const String
- SIndexNotFound → const String
- SInvalidBookmark → const String
- SInvalidCalcType → const String
- SInvalidDisplayValues → const String
- SInvalidFieldKind → const String
- SInvalidFieldSize → const String
- SInvalidSearchFieldType → const String
- SInvalidTypeConversion → const String
- SInvalidVariant → const String
- SInvPacketRecordsValue → const String
- SInvPacketRecordsValueFieldNames → const String
- SInvPacketRecordsValueUniDirectional → const String
- SLogParamValue → const String
- SLookupInfoError → const String
- SMaxIndexes → const String
- SMinIndexes → const String
- SNeedField → const String
- SNeedFieldName → const String
- SNoDataset → const String
- SNoDatasetRegistered → const String
- SNoDatasets → const String
- SNoFieldIndexes → const String
- SNoIndexFieldNameGiven → const String
- SNoParseSQL → const String
- SNoReaderClassRegistered → const String
- SNoSuchRecord → const String
- SNotABoolean → const String
- SNotAFloat → const String
- SNotAninteger → const String
- SNotConnected → const String
- SNotEditing → const String
- SNotIndexField → const String
- SNoTransactionRegistered → const String
- SNoTransactions → const String
- SNotSupported → const String
- SNoUpdateFields → const String
- SNoWhereFields → const String
- SOnUpdateError → const String
- SParameterCountIncorrect → const String
- SParameterNotFound → const String
-
sqlDelimiterCharacters
→ const Set<
String> - SRangeError → const String
- SRangeError2 → const String
- SReadOnlyField → const String
- SRollBackRetaining → const String
- SRollingBack → const String
- SStreamNotRecognised → const String
- STooManyFields → const String
- STransactionRegistered → const String
- STransActive → const String
- STransNotActive → const String
- SUniDirectional → const String
- SUnknownField → const String
- SUnknownFieldType → const String
- SUnknownParamFieldType → const String
- SUnsupportedFieldType → const String
- SUnsupportedParameter → const String
-
yesNoChars
→ const List<
String>
Properties
-
defaultFieldClasses
→ List<
TFieldClass?> -
final
- loginDialogExProc ↔ TLoginDialogExProc?
-
getter/setter pair
- pascalZeroDateTime → DateTime
-
final
Functions
-
buffersEqual(
Uint8List? buf1, Uint8List? buf2, int size) → bool -
databaseError(
String msg, [TComponent? comp]) → Never -
databaseErrorFmt(
String fmt, List args, [TComponent? comp]) → Never -
dataSetEnumerator(
TDataSet aDataSet) → TDataSetEnumerator -
dateTimeRecToDateTime(
TFieldType dt, TDateTimeRec data) → TDateTime4Compat -
dateTimeToDateTimeRec(
TFieldType dt, DateTime data) → TDateTimeRec -
dateTimeToTimeStamp(
DateTime dt) → TTimeStamp -
extractFieldName(
String fields, TIntRef pos) → String -
floatToStrF(
double value, TFloatFormat format, int precision, int digits) → String -
formatDateTime(
String fmt, DateTime dt) → String -
formatFloat(
String fmt, num value) → String -
formatMsg(
String fmt, List args) → String - formatMsg —— corresponds to the subset of SysUtils.Format that db.pas uses: substitutes %s / %d / %f with args' values in order (no width/precision modifiers supported, since dbconst's messages don't use those).
-
mSecsToTimeStamp(
int msecs) → TTimeStamp -
skipComments(
String s, TIntRef p, bool escapeSlash, bool escapeRepeat) → bool -
skipQuotesString(
String s, TIntRef p, String quoteChar, bool escapeSlash, bool escapeRepeat) → void -
strToDateTime(
String s) → DateTime -
strToTime(
String s) → DateTime -
timeStampToDateTime(
TTimeStamp ts) → DateTime -
timeStampToMSecs(
TTimeStamp ts) → int
Typedefs
- LargeInt = int
- TBlobData = Uint8List
- TBlobType = TFieldType
- TBookmark = Uint8List
- TBookmarkStr = String
-
TBufferList
= List<
TRecordBuffer?> - TCollectionItemFactory = TCollectionItem Function(TCollection aCollection)
-
TComponentState
= Set<
TComponentStateItem> - TDataChangeEvent = void Function(Object sender, TField? field)
- TDataOperation = void Function()
- TDataSetErrorEvent = void Function(TDataSet dataSet, EDatabaseError e, TDataActionRef dataAction)
- TDataSetNotifyEvent = void Function(TDataSet dataSet)
- TDateTime4Compat = DateTime
- TDBDatasetClass = TDBDataset Function(TComponent? aOwner)
- TEditMask = String
-
TFieldAttributes
= Set<
TFieldAttribute> -
TFieldChars
= Set<
String> - TFieldClass = TField Function(TComponent? aOwner)
- TFieldGetTextEvent = void Function(TField sender, TStringRef aText, bool displayText)
-
TFieldKinds
= Set<
TFieldKind> -
TFieldMap
= List<
int> - TFieldNotifyEvent = void Function(TField sender)
- TFieldRef = TField
- TFieldSetTextEvent = void Function(TField sender, String aText)
-
TFilterOptions
= Set<
TFilterOption> - TFilterRecordEvent = void Function(TDataSet dataSet, TBoolRef accept)
-
TIndexOptions
= Set<
TIndexOption> -
TLocateOptions
= Set<
TLocateOption> - TLoginDialogExProc = bool Function(String aDatabaseName, TStringRef aUserName, TStringRef aPassword, bool userNameReadOnly)
- TLoginEvent = void Function(Object sender, String username, String password)
- TNotifyEvent = void Function(Object sender)
-
TParamBinding
= List<
int> - TParamClass = TParam Function(TCollection? aCollection)
-
TParamTypes
= Set<
TParamType> -
TProviderFlags
= Set<
TProviderFlag> -
TResyncMode
= Set<
TResyncModeItem> -
TSQLParseOptions
= Set<
TSQLParseOption> - TSystemCodePage = int
-
TUpdateStatusSet
= Set<
TUpdateStatus>
Exceptions / Errors
- EAbort
-
Silent exception that cancels an operation without an error message (FPC
EAbort). - EDatabaseError
-
Error raised by datasets, fields and connections (FPC
EDatabaseError). - EUpdateError
- An EDatabaseError raised while applying cached updates.