dbc/ZDbcMySqlUtils.pas File Reference

Go to the source code of this file.

Functions

 CheckMySQLError (IZMySQLPlainDriver PlainDriver, PZMySQLConnect Handle, TZLoggingCategory LogCategory, const string LogMessage)
 Checks for possible sql errors.
TZSQLType ConvertMySQLHandleToSQLType (IZMySQLPlainDriver PlainDriver, PZMySQLField FieldHandle, Integer FieldFlags)
 Silent exception.
TZSQLType ConvertMySQLTypeToSQLType (string TypeName, string TypeNameFull)
 Convert string mysql field type to SQLType.
Integer ConvertMySQLVersionToSQLVersion (const Integer MySQLVersion)
 Decodes a MySQL Version Value and Encodes it to a Zeos SQL Version format: (major_version * 1,000,000) + (minor_version * 1,000) + sub_version into separated major, minor and subversion values.
 DecodeMySQLVersioning (const Integer MySQLVersion, Integer &MajorVersion, Integer &MinorVersion, Integer &SubVersion)
 Decodes a MySQL Version Value encoded with format: (major_version * 10,000) + (minor_version * 100) + sub_version into separated major, minor and subversion values.
Integer EncodeMySQLVersioning (const Integer MajorVersion, const Integer MinorVersion, const Integer SubVersion)
 Encodes major, minor and subversion (revision) values in MySQL format: (major_version * 10,000) + (minor_version * 100) + sub_version For example, 4.1.12 is returned as 40112.
 EnterSilentMySQLError ()
 LeaveSilentMySQLError ()

Variables

const MAXBUF = 65535
threadvar SilentMySQLError


Function Documentation

CheckMySQLError ( IZMySQLPlainDriver  PlainDriver,
PZMySQLConnect  Handle,
TZLoggingCategory  LogCategory,
const string  LogMessage 
)

Checks for possible sql errors.

Parameters:
PlainDriver a MySQL plain driver.
Handle a MySQL connection handle.
LogCategory a logging category.
LogMessage a logging message.

Definition at line 399 of file ZDbcMySqlUtils.pas.

TZSQLType ConvertMySQLHandleToSQLType ( IZMySQLPlainDriver  PlainDriver,
PZMySQLField  FieldHandle,
Integer  FieldFlags 
)

Silent exception.

Converts a MySQL native types into ZDBC SQL types.

Converts a MySQL native types into ZDBC SQL types.

Parameters:
PlainDriver a native MySQL plain driver.
FieldHandle a handler to field description structure.
FieldFlags field flags.
Returns:
a SQL undepended type.
Parameters:
PlainDriver a native MySQL plain driver.
FieldHandle a handler to field description structure.
FieldFlags a field flags.
Returns:
a SQL undepended type.

Definition at line 194 of file ZDbcMySqlUtils.pas.

TZSQLType ConvertMySQLTypeToSQLType ( string  TypeName,
string  TypeNameFull 
)

Convert string mysql field type to SQLType.

Parameters:
string field type value
Returns:
the SQLType field type value

Definition at line 281 of file ZDbcMySqlUtils.pas.

integer ConvertMySQLVersionToSQLVersion ( const Integer  MySQLVersion  ) 

Decodes a MySQL Version Value and Encodes it to a Zeos SQL Version format: (major_version * 1,000,000) + (minor_version * 1,000) + sub_version into separated major, minor and subversion values.

Decodes a MySQL Version Value and Encodes it to a Zeos SQL Version format: (major_version * 1,000,000) + (minor_version * 1,000) + sub_version into separated major, minor and subversion values So it transforms a version in format XYYZZ to XYYYZZZ where: X = major_version Y = minor_version Z = sub version.

Parameters:
MySQLVersion an integer containing the Full Version to decode.
Returns:
Encoded Zeos SQL Version Value.
Parameters:
MySQLVersion an integer containing the Full MySQL Version to decode.
Returns:
Encoded Zeos SQL Version Value.

Definition at line 482 of file ZDbcMySqlUtils.pas.

DecodeMySQLVersioning ( const Integer  MySQLVersion,
Integer &  MajorVersion,
Integer &  MinorVersion,
Integer &  SubVersion 
)

Decodes a MySQL Version Value encoded with format: (major_version * 10,000) + (minor_version * 100) + sub_version into separated major, minor and subversion values.

Parameters:
MySQLVersion an integer containing the MySQL Full Version to decode.
MajorVersion an integer containing the Major Version decoded.
MinorVersion an integer containing the Minor Version decoded.
SubVersion an integer contaning the Sub Version (revision) decoded.

Definition at line 437 of file ZDbcMySqlUtils.pas.

Integer EncodeMySQLVersioning ( const Integer  MajorVersion,
const Integer  MinorVersion,
const Integer  SubVersion 
)

Encodes major, minor and subversion (revision) values in MySQL format: (major_version * 10,000) + (minor_version * 100) + sub_version For example, 4.1.12 is returned as 40112.

Parameters:
MajorVersion an integer containing the Major Version.
MinorVersion an integer containing the Minor Version.
SubVersion an integer containing the Sub Version (revision).
Returns:
an integer containing the full version.

Definition at line 460 of file ZDbcMySqlUtils.pas.

EnterSilentMySQLError (  ) 

Definition at line 171 of file ZDbcMySqlUtils.pas.

LeaveSilentMySQLError (  ) 

Definition at line 179 of file ZDbcMySqlUtils.pas.

References FIELD_TYPE_NEWDECIMAL.


Variable Documentation

const MAXBUF = 65535

Definition at line 65 of file ZDbcMySqlUtils.pas.

threadvar SilentMySQLError

Definition at line 168 of file ZDbcMySqlUtils.pas.


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