git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@68 b6239004-a887-0f4b-9937-50029ccdca16
869 lines
29 KiB
ObjectPascal
869 lines
29 KiB
ObjectPascal
unit uDAAbsoluteDBDriver;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ Data Abstract Library - Driver Library }
|
|
{ }
|
|
{ compiler: Delphi 6 and up }
|
|
{ platform: Win32 }
|
|
{ }
|
|
{ (c)opyright RemObjects Software. all rights reserved. }
|
|
{ Originally was created by Steve Forbes }
|
|
{ }
|
|
{ Using this code requires a valid license of the Data Abstract }
|
|
{ which can be obtained at http://www.remobjects.com. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$I ..\DataAbstract.inc}
|
|
{$ELSE}
|
|
{$I ../DataAbstract.inc}
|
|
{$ENDIF}
|
|
|
|
|
|
{$R DataAbstract_AbsoluteDBDriver_Glyphs.res}
|
|
|
|
//{$I absvr.inc}
|
|
|
|
interface
|
|
|
|
uses DB, Classes, uDAEngine, uDAInterfaces, uROClasses, ABSMain, uDAUtils;
|
|
|
|
type
|
|
{ TDAAbsoluteDBDriver }
|
|
TDAAbsoluteDBDriver = class(TDADriverReference)
|
|
end;
|
|
|
|
{ IAbsoluteDBConnection }
|
|
IAbsoluteDBConnection = interface
|
|
['{A0A17C42-D225-4610-83D5-FC6D2A554010}']
|
|
end;
|
|
|
|
{ IABSConnectionProperties
|
|
Provides access to common properties of AbsoluteDB connections }
|
|
|
|
IABSConnectionProperties = interface
|
|
['{7B13C981-3131-47A5-A6AC-62635B1777AD}']
|
|
function GetKeepConnections: Boolean;
|
|
procedure SetKeepConnections(Value: Boolean);
|
|
|
|
property KeepConnections: Boolean read GetKeepConnections write SetKeepConnections;
|
|
end;
|
|
|
|
{ TAbsoluteDBConnection }
|
|
TAbsoluteDBConnection = class(TDAConnectionWrapper)
|
|
private
|
|
FDatabase: TABSDatabase;
|
|
FSession: TABSSession;
|
|
|
|
protected
|
|
function GetConnected: Boolean; override;
|
|
procedure SetConnected(Value: Boolean); override;
|
|
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
|
property Database: TABSDatabase read FDatabase;
|
|
property Session: TABSSession read FSession;
|
|
end;
|
|
|
|
{ TDAEAbsoluteDBDriver }
|
|
TDAEAbsoluteDBDriver = class(TDAEDriver)
|
|
private
|
|
|
|
protected
|
|
function GetConnectionClass: TDAEConnectionClass; override;
|
|
|
|
// IDADriver
|
|
function GetDriverID: string; override;
|
|
function GetDescription: string; override;
|
|
|
|
procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
|
|
|
|
function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
|
|
function GetDefaultConnectionType(const AuxDriver: string): string; override; safecall;
|
|
public
|
|
end;
|
|
|
|
{ TDAEAbsoluteDBConnection }
|
|
TDAEAbsoluteDBConnection = class(TDAEConnection, IAbsoluteDBConnection, IABSConnectionProperties)
|
|
private
|
|
FConnection: TAbsoluteDBConnection;
|
|
|
|
protected
|
|
// IABSConnectionProperties
|
|
function GetKeepConnections: Boolean;
|
|
procedure SetKeepConnections(Value: Boolean);
|
|
|
|
// IDAConnection
|
|
function CreateCustomConnection: TCustomConnection; override;
|
|
function CreateMacroProcessor: TDASQLMacroProcessor; override;
|
|
|
|
function GetDatasetClass: TDAEDatasetClass; override;
|
|
procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
|
|
function DoBeginTransaction: Integer; override;
|
|
procedure DoCommitTransaction; override;
|
|
procedure DoRollbackTransaction; override;
|
|
function DoGetInTransaction: Boolean; override;
|
|
procedure DoGetTableNames(out List: IROStrings); override;
|
|
function DoGetLastAutoInc(const GeneratorName: string): integer; override;
|
|
procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection);override;
|
|
function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
|
|
public
|
|
end;
|
|
|
|
{ TDAEAbsoluteDBQuery }
|
|
TDAEAbsoluteDBQuery = class(TDAEDataset, IDAMustSetParams)
|
|
private
|
|
protected
|
|
function CreateDataset(aConnection: TDAEConnection): TDataset; override;
|
|
procedure ClearParams; override;
|
|
function DoExecute: Integer; override;
|
|
function DoGetSQL: string; override;
|
|
procedure DoSetSQL(const Value: string); override;
|
|
procedure DoPrepare(Value: Boolean); override;
|
|
|
|
// IDAMustSetParams
|
|
procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
|
|
procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
|
|
end;
|
|
|
|
const
|
|
AbsoluteDB_DriverType = 'AbsoluteDB';
|
|
|
|
procedure Register;
|
|
|
|
function GetDriverObject: IDADriver; stdcall;
|
|
|
|
implementation
|
|
|
|
uses
|
|
SysUtils, uDADriverManager, uDARes, uDAMacroProcessors, Variants,
|
|
uROBinaryHelpers;
|
|
|
|
var
|
|
_driver: TDAEDriver = nil;
|
|
absolute_reservedwords: array of string;
|
|
|
|
const
|
|
GEN_NAME_DELIMITER = '*';
|
|
|
|
procedure Register;
|
|
begin
|
|
RegisterComponents(DAPalettePageName, [TDAAbsoluteDBDriver]);
|
|
end;
|
|
|
|
{$IFDEF DataAbstract_SchemaModelerOnly}
|
|
{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
|
|
{$ENDIF DataAbstract_SchemaModelerOnly}
|
|
|
|
function GetDriverObject: IDADriver;
|
|
begin
|
|
{$IFDEF DataAbstract_SchemaModelerOnly}
|
|
if not RunningInSchemaModeler then begin
|
|
result := nil;
|
|
exit;
|
|
end;
|
|
{$ENDIF}
|
|
if (_driver = nil) then _driver := TDAEAbsoluteDBDriver.Create(nil);
|
|
result := _driver;
|
|
end;
|
|
|
|
{ TAbsoluteDBConnection }
|
|
|
|
constructor TAbsoluteDBConnection.Create(AOwner: TComponent);
|
|
begin
|
|
inherited;
|
|
|
|
FSession := TABSSession.Create(Self);
|
|
FSession.AutoSessionName := TRUE;
|
|
|
|
FDatabase := TABSDatabase.Create(Self);
|
|
FDatabase.SessionName := FSession.SessionName;
|
|
FDatabase.DatabaseName := 'ABSOLUTEDB';
|
|
end;
|
|
|
|
function TAbsoluteDBConnection.GetConnected: Boolean;
|
|
begin
|
|
result := FDatabase.Connected;
|
|
end;
|
|
|
|
procedure TAbsoluteDBConnection.SetConnected(Value: Boolean);
|
|
begin
|
|
if not(csDestroying in FDatabase.ComponentState) then begin
|
|
try
|
|
FSession.Active := Value;
|
|
FDatabase.Connected := Value;
|
|
except
|
|
FSession.Active := FALSE;
|
|
FDatabase.Connected := FALSE;
|
|
raise;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
{ TDAEAbsoluteDBConnection }
|
|
|
|
procedure TDAEAbsoluteDBConnection.DoApplyConnectionString(
|
|
aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
|
|
begin
|
|
inherited;
|
|
with aConnStrParser do begin
|
|
FConnection.Database.DatabaseFileName := Database;
|
|
|
|
if (AuxParams['DisableTempFiles'] = 'False') then
|
|
begin
|
|
FConnection.Database.DisableTempFiles := False;
|
|
end
|
|
else
|
|
begin
|
|
FConnection.Database.DisableTempFiles := True;
|
|
end;
|
|
|
|
if (AuxParams['Exclusive'] = 'False') then
|
|
begin
|
|
FConnection.Database.Exclusive := False;
|
|
end
|
|
else
|
|
begin
|
|
FConnection.Database.Exclusive := True;
|
|
end;
|
|
|
|
if (AuxParams['HandleShared'] = 'False') then
|
|
begin
|
|
FConnection.Database.HandleShared := False;
|
|
end
|
|
else
|
|
begin
|
|
FConnection.Database.HandleShared := True;
|
|
end;
|
|
|
|
if (AuxParams['KeepConnections'] = 'False') then
|
|
begin
|
|
FConnection.Session.KeepConnections := False;
|
|
FConnection.Database.KeepConnection := False;
|
|
end
|
|
else if (AuxParams['KeepConnections'] = 'True') then
|
|
begin
|
|
FConnection.Session.KeepConnections := True;
|
|
FConnection.Database.KeepConnection := True;
|
|
end;
|
|
|
|
if (AuxParams['MultiUser'] = 'False') then
|
|
begin
|
|
FConnection.Database.MultiUser := False;
|
|
end
|
|
else
|
|
begin
|
|
FConnection.Database.MultiUser := True;
|
|
end;
|
|
|
|
if (AuxParams['DBPassword'] <> '') then
|
|
begin
|
|
fConnection.Database.Password := AuxParams['DBPassword'];
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.DoBeginTransaction: integer;
|
|
begin
|
|
result := -1;
|
|
FConnection.Database.StartTransaction;
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBConnection.DoCommitTransaction;
|
|
begin
|
|
with FConnection do
|
|
Database.Commit;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.CreateCustomConnection: TCustomConnection;
|
|
begin
|
|
result := TAbsoluteDBConnection.Create(nil);
|
|
FConnection := TAbsoluteDBConnection(result);
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.GetDatasetClass: TDAEDatasetClass;
|
|
begin
|
|
result := TDAEAbsoluteDBQuery
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBConnection.DoGetTableNames(out List: IROStrings);
|
|
var
|
|
_database: string;
|
|
begin
|
|
List := TROStrings.Create;
|
|
_database := FConnection.Database.DatabaseName;
|
|
|
|
FConnection.Session.GetTableNames(_database, List.Strings);
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBConnection.DoRollbackTransaction;
|
|
begin
|
|
FConnection.Database.Rollback;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.DoGetInTransaction: Boolean;
|
|
begin
|
|
result := FConnection.Database.InTransaction;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.CreateMacroProcessor: TDASQLMacroProcessor;
|
|
begin
|
|
result := TDADBISAMMacroProcessor.Create;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.GetKeepConnections: Boolean;
|
|
begin
|
|
result := FConnection.Session.KeepConnections;
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBConnection.SetKeepConnections(Value: Boolean);
|
|
begin
|
|
FConnection.Session.KeepConnections := Value;
|
|
FConnection.Database.KeepConnection := Value;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBConnection.DoGetLastAutoInc(
|
|
const GeneratorName: string): integer;
|
|
var
|
|
lQuery: IDADataset;
|
|
TableName: String;
|
|
FieldName: String;
|
|
begin
|
|
try
|
|
if ((GeneratorName <> '') and (Pos(GEN_NAME_DELIMITER, GeneratorName) > 0)) then
|
|
begin
|
|
|
|
TableName := Copy(GeneratorName, 1,
|
|
Pos(GEN_NAME_DELIMITER, GeneratorName) - 1);
|
|
FieldName := Copy(GeneratorName,
|
|
Pos(GEN_NAME_DELIMITER, GeneratorName) + 1,
|
|
Length(GeneratorName) - (Length(TableName) + 1));
|
|
lQuery := GetDatasetClass.Create(Self);
|
|
try
|
|
lQuery.SQL := 'SELECT LASTAUTOINC(''' + TableName + ''', ''' +
|
|
FieldName + ''') from ' + QuoteIdentifierIfNeeded(TableName);
|
|
lQuery.Open;
|
|
Result := lQuery.Fields[0].AsInteger;
|
|
lQuery.Close;
|
|
finally
|
|
lQuery := nil;
|
|
end;
|
|
end
|
|
else
|
|
begin
|
|
Result := inherited DoGetLastAutoInc(GeneratorName);
|
|
end;
|
|
except
|
|
Result := inherited DoGetLastAutoInc(GeneratorName);
|
|
end;
|
|
end;
|
|
|
|
{$IFDEF DELPHI10UP}
|
|
{$WARN SYMBOL_DEPRECATED OFF}
|
|
{$ENDIF DELPHI10UP}
|
|
procedure TDAEAbsoluteDBConnection.DoGetTableFields(const aTableName: string;
|
|
out Fields: TDAFieldCollection);
|
|
var
|
|
i: integer;
|
|
pos1: integer;
|
|
fld: TDAField;
|
|
lofld:TFieldDef;
|
|
s: string;
|
|
ltable: TABSTable;
|
|
begin
|
|
Fields:=TDAFieldCollection.Create(nil);
|
|
ltable:=TABSTable.Create(nil);
|
|
try
|
|
ltable.DatabaseName := FConnection.Database.DatabaseName;
|
|
ltable.SessionName := FConnection.Session.SessionName;
|
|
ltable.TableName := aTableName;
|
|
ltable.FieldDefs.Update;
|
|
for i:=0 to ltable.FieldDefs.Count-1 do begin
|
|
lofld:=ltable.FieldDefs[i];
|
|
fld:= Fields.Add;
|
|
fld.Name:= lofld.Name;
|
|
fld.DataType:= VCLTypeToDAType(lofld.DataType);
|
|
fld.Size:= lofld.Size;
|
|
fld.Required:= lofld.Required;
|
|
fld.ReadOnly:= DB.faReadonly in lofld.Attributes;
|
|
if fld.DataType = datAutoInc then fld.GeneratorName:= aTableName+GEN_NAME_DELIMITER+fld.Name;
|
|
if fld.DataType = datDecimal then begin
|
|
case lofld.DataType of
|
|
ftBCD: begin
|
|
fld.DecimalPrecision:=20;
|
|
fld.DecimalScale:=lofld.Size;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
//pk
|
|
ltable.IndexDefs.Update;
|
|
For i:=0 to ltable.IndexDefs.Count - 1 do
|
|
if ixPrimary in ltable.IndexDefs[i].Options then begin
|
|
Pos1 := 1;
|
|
s:=ltable.IndexDefs[i].Fields;
|
|
while Pos1 <= Length(s) do begin
|
|
fld := Fields.FindField(ExtractFieldName(s, Pos1));
|
|
if fld <> nil then fld.InPrimaryKey:=True;
|
|
end;
|
|
end;
|
|
|
|
finally
|
|
ltable.free;
|
|
end;
|
|
end;
|
|
{$IFDEF DELPHI10UP}
|
|
{$WARN SYMBOL_DEPRECATED ON}
|
|
{$ENDIF DELPHI10UP}
|
|
|
|
function TDAEAbsoluteDBConnection.IdentifierNeedsQuoting(
|
|
const iIdentifier: string): boolean;
|
|
begin
|
|
Result := inherited IdentifierNeedsQuoting(iIdentifier) or TestIdentifier(iIdentifier,absolute_reservedwords);
|
|
end;
|
|
|
|
{ TDAEAbsoluteDBDriver }
|
|
|
|
procedure TDAEAbsoluteDBDriver.GetAuxParams(const AuxDriver: string; out List: IROStrings);
|
|
begin
|
|
inherited;
|
|
|
|
List.Add('DBPassword=');
|
|
List.Add('DisableTempFiles=False,True');
|
|
List.Add('Exclusive=False,True');
|
|
List.Add('HandleShared=False,True');
|
|
List.Add('KeepConnections=False,True');
|
|
List.Add('MultiUser=False,True');
|
|
|
|
List.Sorted := True;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
|
|
begin
|
|
result := [doDatabaseName, doCustom];
|
|
end;
|
|
|
|
function TDAEAbsoluteDBDriver.GetConnectionClass: TDAEConnectionClass;
|
|
begin
|
|
result := TDAEAbsoluteDBConnection
|
|
end;
|
|
|
|
function TDAEAbsoluteDBDriver.GetDefaultConnectionType(
|
|
const AuxDriver: string): string;
|
|
begin
|
|
Result := AbsoluteDB_DriverType;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBDriver.GetDescription: string;
|
|
begin
|
|
result := 'AbsoluteDB Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
|
|
end;
|
|
|
|
function TDAEAbsoluteDBDriver.GetDriverID: string;
|
|
begin
|
|
result := 'AbsoluteDB';
|
|
end;
|
|
|
|
{ TDAEAbsoluteDBQuery }
|
|
|
|
function TDAEAbsoluteDBQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
|
|
begin
|
|
result := TABSQuery.Create(nil);
|
|
|
|
with TABSQuery(result) do begin
|
|
DatabaseName := TDAEAbsoluteDBConnection(aConnection).FConnection.Database.DatabaseName;
|
|
SessionName := TDAEAbsoluteDBConnection(aConnection).FConnection.Session.SessionName;
|
|
ReadOnly := True;
|
|
RequestLive := True;
|
|
end;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBQuery.DoExecute: integer;
|
|
begin
|
|
with TABSQuery(Dataset) do begin
|
|
ExecSQL;
|
|
result := RowsAffected;
|
|
end;
|
|
end;
|
|
|
|
function TDAEAbsoluteDBQuery.DoGetSQL: string;
|
|
begin
|
|
result := TABSQuery(Dataset).SQL.Text
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBQuery.DoPrepare(Value: Boolean);
|
|
begin
|
|
TABSQuery(Dataset).Prepared := Value;
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBQuery.SetParamValues(AParams: TDAParamCollection);
|
|
var
|
|
i: integer;
|
|
par: uDAInterfaces.TDAParam;
|
|
outpar: TParam;
|
|
ft: TFieldType;
|
|
lParIsEmpty: Boolean;
|
|
begin
|
|
for i := 0 to (AParams.Count - 1) do begin
|
|
par := AParams[i];
|
|
outpar := TABSQuery(Dataset).Params.ParamByName(par.Name);
|
|
|
|
ft := DATypeToVCLType(par.DataType);
|
|
|
|
case par.ParamType of
|
|
daptInput: outpar.ParamType := ptInput;
|
|
daptOutput: outpar.ParamType := ptOutput;
|
|
daptInputOutput: outpar.ParamType := ptInputOutput;
|
|
daptResult: outpar.ParamType := ptResult;
|
|
end;
|
|
|
|
lParIsEmpty := VarIsEmpty(par.Value) or VarIsNull(par.Value);
|
|
|
|
if par.DataType = datBlob then begin
|
|
outpar.DataType := ftBlob;
|
|
if not (par.ParamType in [daptOutput, daptResult]) then begin
|
|
if lParIsEmpty then
|
|
outpar.Value := Null
|
|
else
|
|
outpar.Value := VariantToAnsiString(par.Value);
|
|
end;
|
|
end
|
|
else begin
|
|
if (outpar.DataType <> ft) and (ft <> ftUnknown) then outpar.DataType := ft;
|
|
if not (par.ParamType in [daptOutput, daptResult]) then outpar.Value := par.Value;
|
|
end;
|
|
|
|
if lParIsEmpty and (par.DataType <> datUnknown) then begin
|
|
if (outpar.DataType <> ft) and (ft <> ftUnknown) then outpar.DataType := ft;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBQuery.GetParamValues(AParams: TDAParamCollection);
|
|
var
|
|
i: integer;
|
|
par: uDAInterfaces.TDAParam;
|
|
begin
|
|
for i := 0 to (AParams.Count - 1) do begin
|
|
par := AParams[i];
|
|
if Par.ParamType in [daptOutput, daptInputOutput, daptResult] then
|
|
Par.Value := TABSQuery(Dataset).Params.ParamByName(par.Name).Value;
|
|
end;
|
|
end;
|
|
|
|
procedure TDAEAbsoluteDBQuery.DoSetSQL(const Value: string);
|
|
begin
|
|
TABSQuery(Dataset).SQL.Text := Value;
|
|
end;
|
|
|
|
exports GetDriverObject name func_GetDriverObject;
|
|
|
|
procedure TDAEAbsoluteDBQuery.ClearParams;
|
|
begin
|
|
inherited;
|
|
TABSQuery(Dataset).Params.Clear;
|
|
end;
|
|
|
|
procedure absolute_InitializeReservedWords;
|
|
begin
|
|
SetLength(absolute_reservedwords, 283);
|
|
// sorted with TStringList.Sort (bds2007)
|
|
absolute_reservedwords[0] := 'ABS';
|
|
absolute_reservedwords[1] := 'ABSOLUTE';
|
|
absolute_reservedwords[2] := 'ACOS';
|
|
absolute_reservedwords[3] := 'ACTION';
|
|
absolute_reservedwords[4] := 'ADD';
|
|
absolute_reservedwords[5] := 'ALL';
|
|
absolute_reservedwords[6] := 'ALLOCATE';
|
|
absolute_reservedwords[7] := 'ALTER';
|
|
absolute_reservedwords[8] := 'AND';
|
|
absolute_reservedwords[9] := 'ANY';
|
|
absolute_reservedwords[10] := 'ARE';
|
|
absolute_reservedwords[11] := 'AS';
|
|
absolute_reservedwords[12] := 'ASC';
|
|
absolute_reservedwords[13] := 'ASIN';
|
|
absolute_reservedwords[14] := 'ASSERTION';
|
|
absolute_reservedwords[15] := 'AT';
|
|
absolute_reservedwords[16] := 'ATAN';
|
|
absolute_reservedwords[17] := 'AUTHORIZATION';
|
|
absolute_reservedwords[18] := 'AUTOINC';
|
|
absolute_reservedwords[19] := 'AUTOINDEXES';
|
|
absolute_reservedwords[20] := 'AVG';
|
|
absolute_reservedwords[21] := 'BEGIN';
|
|
absolute_reservedwords[22] := 'BETWEEN';
|
|
absolute_reservedwords[23] := 'BIT';
|
|
absolute_reservedwords[24] := 'BIT_LENGTH';
|
|
absolute_reservedwords[25] := 'BLOBBLOCKSIZE';
|
|
absolute_reservedwords[26] := 'BLOBCOMPRESSIONALGORITHM';
|
|
absolute_reservedwords[27] := 'BLOBCOMPRESSIONMODE';
|
|
absolute_reservedwords[28] := 'BOTH';
|
|
absolute_reservedwords[29] := 'BY';
|
|
absolute_reservedwords[30] := 'CASCADE';
|
|
absolute_reservedwords[31] := 'CASCADED';
|
|
absolute_reservedwords[32] := 'CASE';
|
|
absolute_reservedwords[33] := 'CAST';
|
|
absolute_reservedwords[34] := 'CATALOG';
|
|
absolute_reservedwords[35] := 'CEIL';
|
|
absolute_reservedwords[36] := 'CHAR';
|
|
absolute_reservedwords[37] := 'CHAR_LENGTH';
|
|
absolute_reservedwords[38] := 'CHARACTER';
|
|
absolute_reservedwords[39] := 'CHARACTER_LENGTH';
|
|
absolute_reservedwords[40] := 'CHECK';
|
|
absolute_reservedwords[41] := 'CLOSE';
|
|
absolute_reservedwords[42] := 'COALESCE';
|
|
absolute_reservedwords[43] := 'COLLATE';
|
|
absolute_reservedwords[44] := 'COLLATION';
|
|
absolute_reservedwords[45] := 'COLUMN';
|
|
absolute_reservedwords[46] := 'COMMIT';
|
|
absolute_reservedwords[47] := 'CONNECT';
|
|
absolute_reservedwords[48] := 'CONNECTION';
|
|
absolute_reservedwords[49] := 'CONSTRAINT';
|
|
absolute_reservedwords[50] := 'CONSTRAINTS';
|
|
absolute_reservedwords[51] := 'CONTINUE';
|
|
absolute_reservedwords[52] := 'CONVERT';
|
|
absolute_reservedwords[53] := 'CORRESPONDING';
|
|
absolute_reservedwords[54] := 'COS';
|
|
absolute_reservedwords[55] := 'COUNT';
|
|
absolute_reservedwords[56] := 'CREATE';
|
|
absolute_reservedwords[57] := 'CROSS';
|
|
absolute_reservedwords[58] := 'CURRENT';
|
|
absolute_reservedwords[59] := 'CURRENT_DATE';
|
|
absolute_reservedwords[60] := 'CURRENT_TIME';
|
|
absolute_reservedwords[61] := 'CURRENT_TIMESTAMP';
|
|
absolute_reservedwords[62] := 'CURRENT_USER';
|
|
absolute_reservedwords[63] := 'CURSOR';
|
|
absolute_reservedwords[64] := 'CYCLED';
|
|
absolute_reservedwords[65] := 'DATE';
|
|
absolute_reservedwords[66] := 'DAY';
|
|
absolute_reservedwords[67] := 'DEALLOCATE';
|
|
absolute_reservedwords[68] := 'DEC';
|
|
absolute_reservedwords[69] := 'DECIMAL';
|
|
absolute_reservedwords[70] := 'DECLARE';
|
|
absolute_reservedwords[71] := 'DEFAULT';
|
|
absolute_reservedwords[72] := 'DEFERRABLE';
|
|
absolute_reservedwords[73] := 'DEFERRED';
|
|
absolute_reservedwords[74] := 'DELETE';
|
|
absolute_reservedwords[75] := 'DESC';
|
|
absolute_reservedwords[76] := 'DESCRIBE';
|
|
absolute_reservedwords[77] := 'DESCRIPTOR';
|
|
absolute_reservedwords[78] := 'DIAGNOSTICS';
|
|
absolute_reservedwords[79] := 'DISCONNECT';
|
|
absolute_reservedwords[80] := 'DISTINCT';
|
|
absolute_reservedwords[81] := 'DOMAIN';
|
|
absolute_reservedwords[82] := 'DOUBLE';
|
|
absolute_reservedwords[83] := 'DROP';
|
|
absolute_reservedwords[84] := 'ELSE';
|
|
absolute_reservedwords[85] := 'END';
|
|
absolute_reservedwords[86] := 'END-EXEC';
|
|
absolute_reservedwords[87] := 'ESCAPE';
|
|
absolute_reservedwords[88] := 'EXCEPT';
|
|
absolute_reservedwords[89] := 'EXCEPTION';
|
|
absolute_reservedwords[90] := 'EXEC';
|
|
absolute_reservedwords[91] := 'EXECUTE';
|
|
absolute_reservedwords[92] := 'EXISTS';
|
|
absolute_reservedwords[93] := 'EXP';
|
|
absolute_reservedwords[94] := 'EXTERNAL';
|
|
absolute_reservedwords[95] := 'EXTRACT';
|
|
absolute_reservedwords[96] := 'FALSE';
|
|
absolute_reservedwords[97] := 'FETCH';
|
|
absolute_reservedwords[98] := 'FIRST';
|
|
absolute_reservedwords[99] := 'FLOAT';
|
|
absolute_reservedwords[100] := 'FLOOR';
|
|
absolute_reservedwords[101] := 'FLUSH';
|
|
absolute_reservedwords[102] := 'FOR';
|
|
absolute_reservedwords[103] := 'FOREIGN';
|
|
absolute_reservedwords[104] := 'FOUND';
|
|
absolute_reservedwords[105] := 'FROM';
|
|
absolute_reservedwords[106] := 'FULL';
|
|
absolute_reservedwords[107] := 'GET';
|
|
absolute_reservedwords[108] := 'GLOBAL';
|
|
absolute_reservedwords[109] := 'GO';
|
|
absolute_reservedwords[110] := 'GOTO';
|
|
absolute_reservedwords[111] := 'GRANT';
|
|
absolute_reservedwords[112] := 'GROUP';
|
|
absolute_reservedwords[113] := 'HAVING';
|
|
absolute_reservedwords[114] := 'HOUR';
|
|
absolute_reservedwords[115] := 'IDENTITY';
|
|
absolute_reservedwords[116] := 'IF';
|
|
absolute_reservedwords[117] := 'IMMEDIATE';
|
|
absolute_reservedwords[118] := 'IN';
|
|
absolute_reservedwords[119] := 'INCREMENT';
|
|
absolute_reservedwords[120] := 'INDEX';
|
|
absolute_reservedwords[121] := 'INDICATOR';
|
|
absolute_reservedwords[122] := 'INITIALLY';
|
|
absolute_reservedwords[123] := 'INITIALVALUE';
|
|
absolute_reservedwords[124] := 'INNER';
|
|
absolute_reservedwords[125] := 'INPUT';
|
|
absolute_reservedwords[126] := 'INSENSITIVE';
|
|
absolute_reservedwords[127] := 'INSERT';
|
|
absolute_reservedwords[128] := 'INT';
|
|
absolute_reservedwords[129] := 'INTEGER';
|
|
absolute_reservedwords[130] := 'INTERSECT';
|
|
absolute_reservedwords[131] := 'INTERVAL';
|
|
absolute_reservedwords[132] := 'INTO';
|
|
absolute_reservedwords[133] := 'IS';
|
|
absolute_reservedwords[134] := 'ISOLATION';
|
|
absolute_reservedwords[135] := 'JOIN';
|
|
absolute_reservedwords[136] := 'KEY';
|
|
absolute_reservedwords[137] := 'LANGUAGE';
|
|
absolute_reservedwords[138] := 'LAST';
|
|
absolute_reservedwords[139] := 'LASTAUTOINC';
|
|
absolute_reservedwords[140] := 'LASTVALUE';
|
|
absolute_reservedwords[141] := 'LEADING';
|
|
absolute_reservedwords[142] := 'LEFT';
|
|
absolute_reservedwords[143] := 'LENGTH';
|
|
absolute_reservedwords[144] := 'LEVEL';
|
|
absolute_reservedwords[145] := 'LIKE';
|
|
absolute_reservedwords[146] := 'LOCAL';
|
|
absolute_reservedwords[147] := 'LOG';
|
|
absolute_reservedwords[148] := 'LOWER';
|
|
absolute_reservedwords[149] := 'LTRIM';
|
|
absolute_reservedwords[150] := 'MATCH';
|
|
absolute_reservedwords[151] := 'MAX';
|
|
absolute_reservedwords[152] := 'MAXVALUE';
|
|
absolute_reservedwords[153] := 'MEMORY';
|
|
absolute_reservedwords[154] := 'MIMETOBIN';
|
|
absolute_reservedwords[155] := 'MIN';
|
|
absolute_reservedwords[156] := 'MINUS';
|
|
absolute_reservedwords[157] := 'MINUTE';
|
|
absolute_reservedwords[158] := 'MINVALUE';
|
|
absolute_reservedwords[159] := 'MODIFY';
|
|
absolute_reservedwords[160] := 'MODULE';
|
|
absolute_reservedwords[161] := 'MONTH';
|
|
absolute_reservedwords[162] := 'NAMES';
|
|
absolute_reservedwords[163] := 'NATIONAL';
|
|
absolute_reservedwords[164] := 'NATURAL';
|
|
absolute_reservedwords[165] := 'NCHAR';
|
|
absolute_reservedwords[166] := 'NEW';
|
|
absolute_reservedwords[167] := 'NEXT';
|
|
absolute_reservedwords[168] := 'NO';
|
|
absolute_reservedwords[169] := 'NOAUTOINDEXES';
|
|
absolute_reservedwords[170] := 'NOCASE';
|
|
absolute_reservedwords[171] := 'NOCYCLED';
|
|
absolute_reservedwords[172] := '';
|
|
absolute_reservedwords[173] := 'NOMAXVALUE';
|
|
absolute_reservedwords[174] := 'NOMINVALUE';
|
|
absolute_reservedwords[175] := 'NOT';
|
|
absolute_reservedwords[176] := 'NOW';
|
|
absolute_reservedwords[177] := 'NULL';
|
|
absolute_reservedwords[178] := 'NULLIF';
|
|
absolute_reservedwords[179] := 'NUMERIC';
|
|
absolute_reservedwords[180] := 'OCTET_LENGTH';
|
|
absolute_reservedwords[181] := 'OF';
|
|
absolute_reservedwords[182] := 'ON';
|
|
absolute_reservedwords[183] := 'ONLY';
|
|
absolute_reservedwords[184] := 'OPEN';
|
|
absolute_reservedwords[185] := 'OPTION';
|
|
absolute_reservedwords[186] := 'OR';
|
|
absolute_reservedwords[187] := 'ORDER';
|
|
absolute_reservedwords[188] := 'OUTER';
|
|
absolute_reservedwords[189] := 'OUTPUT';
|
|
absolute_reservedwords[190] := 'OVERLAPS';
|
|
absolute_reservedwords[191] := 'PAD';
|
|
absolute_reservedwords[192] := 'PARTIAL';
|
|
absolute_reservedwords[193] := 'PASSWORD';
|
|
absolute_reservedwords[194] := 'POS';
|
|
absolute_reservedwords[195] := 'POSITION';
|
|
absolute_reservedwords[196] := 'POWER';
|
|
absolute_reservedwords[197] := 'PRECISION';
|
|
absolute_reservedwords[198] := 'PREPARE';
|
|
absolute_reservedwords[199] := 'PRESERVE';
|
|
absolute_reservedwords[200] := 'PRIMARY';
|
|
absolute_reservedwords[201] := 'PRIOR';
|
|
absolute_reservedwords[202] := 'PRIVILEGES';
|
|
absolute_reservedwords[203] := 'PROCEDURE';
|
|
absolute_reservedwords[204] := 'PUBLIC';
|
|
absolute_reservedwords[205] := 'RAND';
|
|
absolute_reservedwords[206] := 'READ';
|
|
absolute_reservedwords[207] := 'REAL';
|
|
absolute_reservedwords[208] := 'REFERENCES';
|
|
absolute_reservedwords[209] := 'RELATIVE';
|
|
absolute_reservedwords[210] := 'RENAME';
|
|
absolute_reservedwords[211] := 'RESTRICT';
|
|
absolute_reservedwords[212] := 'REVOKE';
|
|
absolute_reservedwords[213] := 'RIGHT';
|
|
absolute_reservedwords[214] := 'ROLLBACK';
|
|
absolute_reservedwords[215] := 'ROUND';
|
|
absolute_reservedwords[216] := 'ROWNUM';
|
|
absolute_reservedwords[217] := 'ROWS';
|
|
absolute_reservedwords[218] := 'RTRIM';
|
|
absolute_reservedwords[219] := 'SCHEMA';
|
|
absolute_reservedwords[220] := 'SCROLL';
|
|
absolute_reservedwords[221] := 'SECOND';
|
|
absolute_reservedwords[222] := 'SECTION';
|
|
absolute_reservedwords[223] := 'SELECT';
|
|
absolute_reservedwords[224] := 'SESSION';
|
|
absolute_reservedwords[225] := 'SESSION_USER';
|
|
absolute_reservedwords[226] := 'SET';
|
|
absolute_reservedwords[227] := 'SIGN';
|
|
absolute_reservedwords[228] := 'SIN';
|
|
absolute_reservedwords[229] := 'SIZE';
|
|
absolute_reservedwords[230] := 'SMALLINT';
|
|
absolute_reservedwords[231] := 'SOME';
|
|
absolute_reservedwords[232] := 'SPACE';
|
|
absolute_reservedwords[233] := 'SQL';
|
|
absolute_reservedwords[234] := 'SQLCODE';
|
|
absolute_reservedwords[235] := 'SQLERROR';
|
|
absolute_reservedwords[236] := 'SQLSTATE';
|
|
absolute_reservedwords[237] := 'SQR';
|
|
absolute_reservedwords[238] := 'SQRT';
|
|
absolute_reservedwords[239] := 'START';
|
|
absolute_reservedwords[240] := 'SUBSTRING';
|
|
absolute_reservedwords[241] := 'SUM';
|
|
absolute_reservedwords[242] := 'SYSDATE';
|
|
absolute_reservedwords[243] := 'SYSTEM_USER';
|
|
absolute_reservedwords[244] := 'TABLE';
|
|
absolute_reservedwords[245] := 'TEMPORARY';
|
|
absolute_reservedwords[246] := 'THEN';
|
|
absolute_reservedwords[247] := 'TIME';
|
|
absolute_reservedwords[248] := 'TIMESTAMP';
|
|
absolute_reservedwords[249] := 'TIMEZONE_HOUR';
|
|
absolute_reservedwords[250] := 'TIMEZONE_MINUTE';
|
|
absolute_reservedwords[251] := 'TO';
|
|
absolute_reservedwords[252] := 'TODATE';
|
|
absolute_reservedwords[253] := 'TOP';
|
|
absolute_reservedwords[254] := 'TOSTRING';
|
|
absolute_reservedwords[255] := 'TRAILING';
|
|
absolute_reservedwords[256] := 'TRANSACTION';
|
|
absolute_reservedwords[257] := 'TRANSLATE';
|
|
absolute_reservedwords[258] := 'TRANSLATION';
|
|
absolute_reservedwords[259] := 'TRIM';
|
|
absolute_reservedwords[260] := 'TRUE';
|
|
absolute_reservedwords[261] := 'TRUNCATE';
|
|
absolute_reservedwords[262] := 'UNION';
|
|
absolute_reservedwords[263] := 'UNIQUE';
|
|
absolute_reservedwords[264] := 'UNKNOWN';
|
|
absolute_reservedwords[265] := 'UPDATE';
|
|
absolute_reservedwords[266] := 'UPPER';
|
|
absolute_reservedwords[267] := 'USAGE';
|
|
absolute_reservedwords[268] := 'USER';
|
|
absolute_reservedwords[269] := 'USING';
|
|
absolute_reservedwords[270] := 'VALUE';
|
|
absolute_reservedwords[271] := 'VALUES';
|
|
absolute_reservedwords[272] := 'VARCHAR';
|
|
absolute_reservedwords[273] := 'VARYING';
|
|
absolute_reservedwords[274] := 'VIEW';
|
|
absolute_reservedwords[275] := 'WHEN';
|
|
absolute_reservedwords[276] := 'WHENEVER';
|
|
absolute_reservedwords[277] := 'WHERE';
|
|
absolute_reservedwords[278] := 'WITH';
|
|
absolute_reservedwords[279] := 'WORK';
|
|
absolute_reservedwords[280] := 'WRITE';
|
|
absolute_reservedwords[281] := 'YEAR';
|
|
absolute_reservedwords[282] := 'ZONE';
|
|
end;
|
|
|
|
initialization
|
|
_driver := nil;
|
|
RegisterDriverProc(GetDriverObject);
|
|
absolute_InitializeReservedWords;
|
|
finalization
|
|
absolute_reservedwords := nil;
|
|
UnregisterDriverProc(GetDriverObject);
|
|
FreeAndNil(_driver);
|
|
|
|
end.
|
|
|