Unit rtcDB

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Database related classes and functions - Copyright 2004-2018 (c) Teppi Technology (https://rtc.teppi.net)

This unit provides Database-related classes and functions.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class ERtcDB  
Class TRtcDataSetRecorder DataSet Change Recorder
Class TRtcDataSetMonitor TDataSet Monitor
Class TRtcMemDataSet DB-aware in-Memory DataSet, used to view and manipulate TRtcDataSet data

Functions and Procedures

function RTC_FIELD2DB_TYPE(val:TRtcFieldTypes):TFieldType;
Function RTC_DB2FIELD_TYPE(val:TFieldType):TRtcFieldTypes;
procedure DelphiDataSetToRtc(DelphiDS:TDataSet; rtcDS:TRtcDataSet; ClearFieldDefs:boolean=True; OnlyDataFields:boolean=True);
procedure DelphiDataSetToRtcArray(DelphiDS:TDataSet; rtcArr:TRtcArray; OnlyDataFields:boolean=False);
procedure RtcDataSetFieldsToDelphi(rtcDS:TRtcDataSet; DelphiDS:TDataSet);
procedure RtcDataSetRowsToDelphi(rtcDS:TRtcDataSet; DelphiDS:TDataSet);
procedure RtcPrepareSqlWhere(Filter:TRtcRecord; ParamPrefix:String; CompareOperator:String; const TableName:String; var SqlWhere:String);
procedure RtcSetSqlWhereParams(Filter:TRtcRecord; ParamPrefix:String; qry:TParams);
function RtcPrepareSqlAction(chg:TRtcDataSetChanges; const TableName:String; SqlWhere:String=''):String;
procedure RtcSetSqlActionParams(chg:TRtcDataSetChanges; qry:TParams);
procedure RtcSkipGraphicFieldHeader(BlobStream:TStream);

Types

TRtcValueBuffer=TValueBuffer;

Variables

GetRTCFieldType:function(ft:TFieldType):TRtcFieldTypes;

Description

Functions and Procedures

function RTC_FIELD2DB_TYPE(val:TRtcFieldTypes):TFieldType;

Convert RTC Field Type to Delphi Field Type

Function RTC_DB2FIELD_TYPE(val:TFieldType):TRtcFieldTypes;

Convert Delphi Field Type to RTC Field Type

procedure DelphiDataSetToRtc(DelphiDS:TDataSet; rtcDS:TRtcDataSet; ClearFieldDefs:boolean=True; OnlyDataFields:boolean=True);

Copy data from a Delphi TDataSet into a TRtcDataSet (used for transport)

procedure DelphiDataSetToRtcArray(DelphiDS:TDataSet; rtcArr:TRtcArray; OnlyDataFields:boolean=False);

Copy data from a Delphi TDataSet into a TRtcArray of TRtcRecords (used for transport)

procedure RtcDataSetFieldsToDelphi(rtcDS:TRtcDataSet; DelphiDS:TDataSet);

Copy field definition from a TRtcDataSet (used for transport ) to a Delphi TDataSet

procedure RtcDataSetRowsToDelphi(rtcDS:TRtcDataSet; DelphiDS:TDataSet);

Copy data rows from a TRtcDataSet (used for transport) to a Delphi TDataSet

procedure RtcPrepareSqlWhere(Filter:TRtcRecord; ParamPrefix:String; CompareOperator:String; const TableName:String; var SqlWhere:String);

Extend the SQL "WHERE" clause with a new record filter: Filter = record with filter names and values; ParamPrefix = prefix to be used for field names in Params; CompareOperator = compare operator to be used in the filter (=, <, >, <=, >=); TableName = Table Name; SqlWhere = SQL "WHERE" clause to be modified/extended

procedure RtcSetSqlWhereParams(Filter:TRtcRecord; ParamPrefix:String; qry:TParams);

Set SQL Where Params with record filter values (call "rtcPrepareSqlWhere" to prepare the SQL statement first!): qry = SQL Query Params to be extended; Filter = record with filter names and values; ParamPrefix = prefix to be used for field names in Params

function RtcPrepareSqlAction(chg:TRtcDataSetChanges; const TableName:String; SqlWhere:String=''):String;

Prepare Action SQL statement (INSERT/UPDATE/DELETE): chg = TRtcDataSetChanges object positioned at the action to be applied; TableName = Table Name; SqlWhere = Optional SQL "WHERE" clause; Result = SQL Statement for executing the Action

procedure RtcSetSqlActionParams(chg:TRtcDataSetChanges; qry:TParams);

Set SQL Action Params: qry = SQL Query Params to be extended; chg = TRtcDataSetChanges object positioned at the action to be applied

procedure RtcSkipGraphicFieldHeader(BlobStream:TStream);

Internal function for skipping TGraphicField headers inside a BlobStream. Can be used in custom functions for copying a Delphi DataSet to a RTC DataSet.

Types

TRtcValueBuffer=TValueBuffer;
 

Variables

GetRTCFieldType:function(ft:TFieldType):TRtcFieldTypes;
 

Generated by PasDoc 0.14.0.