28 |
|
|
29 |
|
unit IBUtils; |
30 |
|
|
31 |
+ |
{$Mode Delphi} |
32 |
+ |
|
33 |
|
interface |
34 |
|
|
35 |
|
uses |
36 |
< |
Windows, Classes, SysUtils; |
36 |
> |
{$IFDEF LINUX } |
37 |
> |
unix, |
38 |
> |
{$ELSE} |
39 |
> |
Windows, |
40 |
> |
{$ENDIF} |
41 |
> |
Classes, SysUtils; |
42 |
|
|
43 |
|
const |
44 |
|
CRLF = #13 + #10; |
55 |
|
function FormatIdentifier(Dialect: Integer; Value: String): String; |
56 |
|
function FormatIdentifierValue(Dialect: Integer; Value: String): String; |
57 |
|
function ExtractIdentifier(Dialect: Integer; Value: String): String; |
58 |
+ |
function QuoteIdentifier(Dialect: Integer; Value: String): String; |
59 |
|
|
60 |
|
implementation |
61 |
|
|
151 |
|
Result := Value; |
152 |
|
end; |
153 |
|
|
154 |
+ |
function QuoteIdentifier(Dialect: Integer; Value: String): String; |
155 |
+ |
begin |
156 |
+ |
if Dialect = 1 then |
157 |
+ |
Value := AnsiUpperCase(Trim(Value)) |
158 |
+ |
else |
159 |
+ |
Value := '"' + Value + '"'; |
160 |
+ |
Result := Value; |
161 |
+ |
end; |
162 |
+ |
|
163 |
|
end. |