2018-11-02 21:43:09 +01:00
|
|
|
// *************************************************************************** }
|
|
|
|
//
|
|
|
|
// Delphi MVC Framework
|
|
|
|
//
|
2023-01-17 08:52:26 +01:00
|
|
|
// Copyright (c) 2010-2023 Daniele Teti and the DMVCFramework Team
|
2018-11-02 21:43:09 +01:00
|
|
|
//
|
|
|
|
// https://github.com/danieleteti/delphimvcframework
|
|
|
|
//
|
|
|
|
// ***************************************************************************
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
unit MVCFramework.RQL.AST2InterbaseSQL;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
2022-04-12 12:12:08 +02:00
|
|
|
System.Generics.Defaults,
|
2018-11-02 21:43:09 +01:00
|
|
|
MVCFramework.RQL.Parser,
|
|
|
|
MVCFramework.RQL.AST2FirebirdSQL;
|
|
|
|
|
|
|
|
type
|
|
|
|
TRQLInterbaseCompiler = class(TRQLFirebirdCompiler)
|
2022-04-12 12:12:08 +02:00
|
|
|
protected
|
|
|
|
function GetLiteralBoolean(const Value: Boolean): String; override;
|
2018-11-02 21:43:09 +01:00
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
|
|
|
System.SysUtils,
|
|
|
|
MVCFramework.ActiveRecord;
|
|
|
|
|
2022-04-12 12:12:08 +02:00
|
|
|
{ TRQLInterbaseCompiler }
|
|
|
|
|
|
|
|
function TRQLInterbaseCompiler.GetLiteralBoolean(const Value: Boolean): String;
|
|
|
|
begin
|
|
|
|
if Value then
|
|
|
|
begin
|
|
|
|
Exit('1');
|
|
|
|
end;
|
|
|
|
Exit('0');
|
|
|
|
end;
|
|
|
|
|
2018-11-02 21:43:09 +01:00
|
|
|
initialization
|
|
|
|
|
|
|
|
TRQLCompilerRegistry.Instance.RegisterCompiler('interbase', TRQLInterbaseCompiler);
|
|
|
|
|
|
|
|
finalization
|
|
|
|
|
|
|
|
TRQLCompilerRegistry.Instance.UnRegisterCompiler('interbase');
|
|
|
|
|
|
|
|
end.
|