dbc/ZDbcPostgreSqlUtils.pas File Reference

Go to the source code of this file.

Functions

 CheckPostgreSQLError (IZConnection Connection, IZPostgreSQLPlainDriver PlainDriver, PZPostgreSQLConnect Handle, TZLoggingCategory LogCategory, string LogMessage, PZPostgreSQLResult ResultHandle)
 Checks for possible sql errors.
string DecodeString (string Value)
 Converts an string from escape PostgreSQL format.
string EncodeBinaryString (string Value)
 add by Perger -> based on SourceForge: [ 1520587 ] Fix for 1484704: bytea corrupted on post when not using utf8, file: 1484704.patch
string EncodeString (TZPgCharactersetType CharactersetCode, string Value)
 Encode string which probably consists of multi-byte characters.
string EncodeString (string Value)
 Converts an string into escape PostgreSQL format.
Word GetMinorVersion (string Value)
 Resolve problem with minor version in PostgreSql bettas.
Boolean IsNumber (TZSQLType Value)
 Indicate what field type is a number (integer, float and etc.
TZPgCharactersetType pg_CS_code (const string InputString)
 Determine the character code in terms of enumerated number.
TZSQLType PostgreSQLToSQLType (IZPostgreSQLConnection Connection, Integer TypeOid)
 Another version of PostgreSQLToSQLType()
  • comparing integer should be faster than AnsiString? Return ZSQLType from PostgreSQL type name.

TZSQLType PostgreSQLToSQLType (IZPostgreSQLConnection Connection, string TypeName)
 Return ZSQLType from PostgreSQL type name.


Function Documentation

CheckPostgreSQLError ( IZConnection  Connection,
IZPostgreSQLPlainDriver  PlainDriver,
PZPostgreSQLConnect  Handle,
TZLoggingCategory  LogCategory,
string  LogMessage,
PZPostgreSQLResult  ResultHandle 
)

Checks for possible sql errors.

Parameters:
Connection a reference to database connection to execute Rollback.
PlainDriver a PostgreSQL plain driver.
Handle a PostgreSQL connection reference.
LogCategory a logging category.
LogMessage a logging message.
ResultHandle the Handle to the Result

string DecodeString ( string  Value  ) 

Converts an string from escape PostgreSQL format.

Parameters:
Value a string in PostgreSQL escape format.
Returns:
a regular string.

Definition at line 314 of file ZDbcSqLiteUtils.pas.

string EncodeBinaryString ( string  Value  ) 

add by Perger -> based on SourceForge: [ 1520587 ] Fix for 1484704: bytea corrupted on post when not using utf8, file: 1484704.patch

Converts a binary string into escape PostgreSQL format.

Parameters:
Value a binary stream.
Returns:
a string in PostgreSQL binary string escape format.

string EncodeString ( TZPgCharactersetType  CharactersetCode,
string  Value 
)

Encode string which probably consists of multi-byte characters.

Characters ' (apostraphy), low value (value zero), and \ (back slash) are encoded. Since we have noticed that back slash is the second byte of some BIG5 characters (each of them is two bytes in length), we need a characterset aware encoding function.

Parameters:
CharactersetCode the characterset in terms of enumerate code.
Value the regular string.
Returns:
the encoded string.

string EncodeString ( string  Value  ) 

Converts an string into escape PostgreSQL format.

Parameters:
Value a regular string.
Returns:
a string in PostgreSQL escape format.

Definition at line 262 of file ZDbcSqLiteUtils.pas.

Word GetMinorVersion ( string  Value  ) 

Resolve problem with minor version in PostgreSql bettas.

Parameters:
Value a minor version string like "4betta2"
Returns:
a miror version number

Boolean IsNumber ( TZSQLType  Value  ) 

Indicate what field type is a number (integer, float and etc.

)

Parameters:
the SQLType field type value
Returns:
true if field type number

TZPgCharactersetType pg_CS_code ( const string  InputString  ) 

Determine the character code in terms of enumerated number.

Parameters:
InputString the input string.
Returns:
the character code in terms of enumerated number.

TZSQLType PostgreSQLToSQLType ( IZPostgreSQLConnection  Connection,
Integer  TypeOid 
)

Another version of PostgreSQLToSQLType()

  • comparing integer should be faster than AnsiString? Return ZSQLType from PostgreSQL type name.

Parameters:
Connection a connection to PostgreSQL
TypeOid is PostgreSQL type OID
Returns:
The ZSQLType type

TZSQLType PostgreSQLToSQLType ( IZPostgreSQLConnection  Connection,
string  TypeName 
)

Return ZSQLType from PostgreSQL type name.

Parameters:
Connection a connection to PostgreSQL
The TypeName is PostgreSQL type name
Returns:
The ZSQLType type


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