dbc/ZDbcUtils.pas File Reference

Go to the source code of this file.

Functions

string AQSNull (const string Value, Char QuoteChar= '')
 AnsiQuotedStr or Null.
string AQSNullText (const string Value, const string NullText, Char QuoteChar= '')
 AnsiQuotedStr or NullText.
Boolean CheckConvertion (TZSQLType InitialType, TZSQLType ResultType)
 Checks is the convertion from one type to another type allowed.
 CopyColumnsInfo (TObjectList FromList, TObjectList ToList)
 Copies column information objects from one object list to another one.
string DefineColumnTypeName (TZSQLType ColumnType)
 Defines a name of the column type.
string DefineStatementParameter (IZStatement Statement, const string ParamName, const string Default)
 Defines a statement specific parameter.
 RaiseSQLException (Exception E)
 Raises a copy of the given exception.
string ResolveConnectionProtocol (string Url, TStringDynArray SupportedProtocols)
 Resolves a connection protocol and raises an exception with protocol is not supported.
 ResolveDatabaseUrl (const string Url, TStrings Info, string &HostName, Integer &Port, string &Database, string &UserName, string &Password, TStrings ResultInfo)
 Resolves a database URL and fills the database connection parameters.
string ToLikeString (const string Value)
 ToLikeString returns the given string or if the string is empty it returns ''.


Function Documentation

string AQSNull ( const string  Value,
Char  QuoteChar = '' 
)

AnsiQuotedStr or Null.

Parameters:
S the string
Returns:
'null' if S is '', otherwise AnsiQuotedStr(S)

string AQSNullText ( const string  Value,
const string  NullText,
Char  QuoteChar = '' 
)

AnsiQuotedStr or NullText.

Parameters:
S the string
NullText the "NULL"-Text
QuoteChar the char that is used for quotation
Returns:
'null' if S is '', otherwise AnsiQuotedStr(S)

Boolean CheckConvertion ( TZSQLType  InitialType,
TZSQLType  ResultType 
)

Checks is the convertion from one type to another type allowed.

Parameters:
InitialType an initial data type.
ResultType a result data type.
Returns:
True if convertion is allowed or False otherwise.

CopyColumnsInfo ( TObjectList  FromList,
TObjectList  ToList 
)

Copies column information objects from one object list to another one.

Parameters:
FromList the source object list.
ToList the destination object list.

string DefineColumnTypeName ( TZSQLType  ColumnType  ) 

Defines a name of the column type.

Parameters:
ColumnType a type of the column.
Returns:
a name of the specified type.

string DefineStatementParameter ( IZStatement  Statement,
const string  ParamName,
const string  Default 
)

Defines a statement specific parameter.

Parameters:
Statement a statement interface reference.
ParamName a name of the parameter.
Default a parameter default value.
Returns:
a parameter value or default if nothing was found.

RaiseSQLException ( Exception  E  ) 

Raises a copy of the given exception.

Parameters:
E an exception to be raised.

string ResolveConnectionProtocol ( string  Url,
TStringDynArray  SupportedProtocols 
)

Resolves a connection protocol and raises an exception with protocol is not supported.

Parameters:
Url an initial database URL.
SuupportedProtocols a driver's supported subprotocols.
Url an initial database URL.
SupportedProtocols a driver's supported subprotocols.

Definition at line 206 of file ZDbcUtils.pas.

ResolveDatabaseUrl ( const string  Url,
TStrings  Info,
string &  HostName,
Integer &  Port,
string &  Database,
string &  UserName,
string &  Password,
TStrings  ResultInfo 
)

Resolves a database URL and fills the database connection parameters.

Parameters:
Url an initial database URL.
Info an initial info parameters.
HostName a name of the database host.
Port a port number.
Database a database name.
UserName a name of the database user.
Password a user's password.
ResutlInfo a result info parameters.

string ToLikeString ( const string  Value  ) 

ToLikeString returns the given string or if the string is empty it returns ''.

Parameters:
Value the string
Returns:
given Value or ''


Generated on Wed Dec 30 08:42:42 2009 for zeoslib by  doxygen 1.5.7.1