DB unit
Database access layer.
The
db unit provides the basis for all database access
mechanisms. It introduces abstract classes, on which all database
access mechanisms are based:
TDataset representing a
set of records from a database,
TField which represents
the contents of a field in a record,
TDatasource which
acts as an event distributor on behalf of a dataset and
TParams
which can be used to parameterize queries. The databases connections
themselves are abstracted in the
TDatabase class.
Classes and records
EDatabaseError | class | Base class for all database-related errors. |
EUpdateError | class | Error raised when updating data during a post operation. |
IProviderSupport | interface | Interface for Provider support. |
TArrayField | class | |
TAutoIncField | class | Field for auto-incremental, 32-bit signed integer data. |
TBCDField | class | Field class for Binary Coded Decimal (BCD) values. |
TBinaryField | class | Field class for working with binary field data. |
TBlobField | class | Base class for BLOB field data. |
TBooleanField | class | Boolean field class type. |
TByteField | class | Field class for 8-bit unsigned integer data. |
TBytesField | class | Field class for fixed size byte array values. |
TCheckConstraint | class | Record-level constraint definition. |
TCheckConstraints | class | Set of record-level constraints. |
TCurrencyField | class | Class for currency fields. |
TCustomConnection | class | Abstract class for connections to a server. |
TDatabase | class | Base class for connecting a FreePascal application to an external Database engine. |
TDataLink | class | Data event handling agent for controls. |
TDataSet | class | Base class for records-based data-access. |
TDataSetEnumerator | class | Enumerator for TDataset records. |
TDataSource | class | Component representing the link between a local (GUI) component and a dataset. |
TDateField | class | Field class for date values. |
TDateTimeField | class | Field class for date/time/Datetime values. |
TDateTimeRec | record | Date/Time record. |
TDBDataset | class | Dataset connected to a database. |
TDBTransaction | class | Encapsulate a transaction. |
TDefCollection | class | Definition collection. |
TDetailDataLink | class | Represents the link between a detail data source and a master datasource. |
TExtendedField | class | |
TField | class | Provide access to the contents of a single field in a record. |
TFieldDef | class | Class to describe one field in a record in a dataset. |
TFieldDefs | class | Collection of TFieldDef instances. |
TFields | class | Collection of instances. |
TFieldsEnumerator | class | Default enumerator for the fields collection of a dataset. |
TFloatField | class | Class for floating point values. |
TFMTBCDField | class | Fixed precision floating point data field. |
TGraphicField | class | Field class for graphical BLOB field data. |
TGuidField | class | Field class for native variant data. |
TIndexDef | class | Index definition. |
TIndexDefs | class | A class to keep a list of index definitions. |
TIntegerField | class | Alias for TLongintField. |
TLargeintField | class | Field class for 64-bit signed integer data. |
TLongintField | class | Field class for 32-bit signed integer data. |
TLongWordField | class | Field class for 32-bit unsigned integer data. |
TLookupList | class | Class to manage lookup list values. |
TLookupListRec | record | Record to store lookup results. |
TMasterDataLink | class | Datalink for Master-Detail relationships between datasets. |
TMasterParamsDataLink | class | Class to establish a master-detail relationship between dataset, based on parameters. |
TMemoField | class | Base class for MEMO (text BLOB) field data. |
TNamedItem | class | Named collection item. |
TNumericField | class | Base class for all numerical data field classes. |
TObjectField | class | |
TParam | class | Parameter description class. |
TParams | class | A collection of parameter values for SQL-based datasets. |
TParamsEnumerator | class | Enumerator for parameters. |
TShortintField | class | Field class for 8-bit signed integer data. |
TSingleField | class | |
TSmallintField | class | Field class for smallint (16-bit signed integer) data. |
TStringField | class | Field class to handle ansistring fields. |
TTimeField | class | Field class for time values. |
TVarBytesField | class | Field class for variable size byte array values. |
TVariantField | class | Field class for native variant data. |
TWideMemoField | class | Field class for wide MEMO (widestring text BLOB) field data. |
TWideStringField | class | Field class for widestring data. |
TWordField | class | Field class for word (16-bit unsigned integer) data. |
Procedures and functions
BuffersEqual | function | Check whether 2 memory buffers are equal. |
DatabaseError | procedure | Raise an EDatabaseError exception. |
DatabaseErrorFmt | procedure | Raise an EDatabaseError exception with a formatted message. |
DateTimeRecToDateTime | function | Convert TDateTimeRec record to a TDateTime value. |
DateTimeToDateTimeRec | function | Convert TDateTime value to a TDateTimeRec record. |
DisposeMem | procedure | Dispose of a heap memory block and Nil the pointer (deprecated). |
enumerator(TDataSet):TDataSetEnumerator | operator | Operator to return dataset enumerator. |
ExtractFieldName | function | Extract the field name at position. |
SkipComments | function | Skip SQL comments. |
Types
LargeInt | type | Large (64-bit) integer. |
PBookmarkFlag | type | Pointer to TBookmarkflag type. |
PBufferList | type | Pointer to TBufferlist type. |
PDateTimeRec | type | Pointer to TDateTimeRec record. |
PLargeInt | type | Pointer to Large (64-bit) integer. |
PLookupListRec | type | Pointer to TLookupListRec record. |
TBlobData | type | Alias type to store blob data. |
TBlobStreamMode | enumeration | Mode used when creating a blob stream. |
TBlobType | type | Valid BLOB fieldtypes. |
TBookMark | type | Bookmark type. |
TBookmarkFlag | enumeration | Bookmark flags. |
TBookmarkStr | type | Bookmark as string type - deprecated. |
TBufferArray | type | Pointer to an array of buffers. |
TBufferList | type | Array of PChar records. |
TCloseErrorEvent | procedure type | |
TDataAction | enumeration | Action to take when a data manipulation operation has failed. |
TDatabaseClass | type | Class pointer for TDatabase. |
TDataChangeEvent | procedure type | Event handler prototype when a field's data has changed. |
TDataEvent | enumeration | Various events that are sent to datasources. |
TDataOperation | procedure type | Internal callback type. |
TDatasetClass | type | Class type for the TDataset class. |
TDataSetErrorEvent | procedure type | Error handling callback. |
TDataSetNotifyEvent | procedure type | Event handler prototype for dataset events. |
TDataSetState | enumeration | Current state of the dataset. |
TDateTimeAlias | type | Alias for TDateTime type. |
TDBDatasetClass | type | Class of TDBDataset. |
TFieldAttribute | enumeration | Field attributes. |
TFieldAttributes | set | Set of TFieldAttribute values. |
TFieldChars | set | Set of valid characters for the field contents. |
TFieldClass | type | |
TFieldDefClass | type | Class of TFieldDef. |
TFieldDefsClass | type | Class of TFieldDefs. |
TFieldGetTextEvent | procedure type | Event handler to get field content. |
TFieldKind | enumeration | Kind of field. |
TFieldKinds | set | Set of TFieldKind values. |
TFieldMap | type | Array type with TFieldType as index type. |
TFieldNotifyEvent | procedure type | Notification handler prototype. |
TFieldRef | type | Pointer to a TField instance. |
TFieldsClass | type | Class of TFields. |
TFieldSetTextEvent | procedure type | Event handler to get field content. |
TFieldType | enumeration | Field data type description. |
TFilterOption | enumeration | Available filter options. |
TFilterOptions | set | Set of filter options to use. |
TFilterRecordEvent | procedure type | Record filtering event handler prototype. |
TGetMode | enumeration | Get new buffer mode. |
TGetResult | enumeration | result of the GetRecord operation. |
TIndexOption | enumeration | Index description flags. |
TIndexOptions | set | Set of TIndexOption values. |
TLocateOption | enumeration | Available options when locating a record in a dataset. |
TLocateOptions | set | Options to use when locating a record in a dataset. |
TLoginEvent | procedure type | Login event handler. |
TParamBinding | type | Auxiliary type, used when binding parameters. |
TParamClass | type | Class of TParam. |
TParamStyle | enumeration | Style of parameter. |
TParamType | enumeration | Parameter type. |
TParamTypes | set | Set of TParamType. |
TProviderFlag | enumeration | What to do with fields when applying updates. |
TProviderFlags | set | Set of flags. |
TPSCommandType | enumeration | Type of SQL command. |
TRecordBuffer | type | Pointer type for record data buffer. |
TRecordBufferBaseType | type | Opaque base type for TRecordBuffer. |
TResolverResponse | enumeration | Resolver response code. |
TResyncMode | set | Internal flag for resynchronisation. |
TSQLParseOption | enumeration | Represents SQL parser options available to the TParams collection. |
TSQLParseOptions | set | Set type used to store value(s) from the TSQLParseOption enumeration. |
TStringFieldBuffer | type | Type to access string field content buffers as an array of characters. |
TUpdateAction | enumeration | Action to perform when an update operation fails. |
TUpdateKind | enumeration | Kind of update operation. |
TUpdateMode | enumeration | Update mode. |
TUpdateStatus | enumeration | Record update status. |
TUpdateStatusSet | set | Set of update states. |
Constants
DefaultFieldClasses | constant | Default field classes to use when creating a new TField instance. |
dsEditModes | constant | Edit modes. |
dsMaxBufferCount | constant | Maximum data buffers count for dataset. |
dsMaxStringSize | constant | Maximum size of string fields. |
dsWriteModes | constant | Field write modes. |
FieldTypeNames | constant | Human-readable names of field types. |
FieldTypetoVariantMap | constant | Map field types on variant types. |
ftBlobTypes | constant | Constant enumerating all blob types. |
ObjectFieldTypes | constant | |
SQLDelimiterCharacters | constant | SQL statement delimiter token characters. |
YesNoChars | constant | Array of characters mapping a boolean to Y/N. |
Variables
LoginDialogExProc | variable | Login dialog callback. |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
