Gda.ConnectionEvent

g GObject.Object GObject.Object Gda.ConnectionEvent Gda.ConnectionEvent GObject.Object->Gda.ConnectionEvent

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_code ()

get_description ()

get_event_type ()

get_gda_code ()

get_source ()

get_sqlstate ()

set_code (code)

set_description (description)

set_event_type (type)

set_gda_code (code)

set_source (source)

set_sqlstate (sqlstate)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

type

int

r/w

Connection event type

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

object

GObject.Object

r

Class Details

class Gda.ConnectionEvent(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gda.ConnectionEventClass

get_code()
Returns:

self's code (the code is specific to the provider being used)

Return type:

int

get_description()
Returns:

self's description.

Return type:

str

Get the description of the event. Note that is self's type is Gda.ConnectionEventType.COMMAND, the the description is the SQL of the command.

get_event_type()
Returns:

the event type

Return type:

Gda.ConnectionEventType

Get self's severity (from a simple notice to a fatal event)

get_gda_code()
Returns:

the Gda.ConnectionEventCode event’s code

Return type:

Gda.ConnectionEventCode

Retrieve the code associated to self.

get_source()
Returns:

self's source.

Return type:

str

get_sqlstate()
Returns:

self's SQL state.

Return type:

str

Get the SQLSTATE value of self. Even though the SQLSTATE values are specified by ANSI SQL and ODBC, consult each DBMS for the possible values. However, the “00000” (success) value means that there is no error, and the “HY000” (general error) value means an error but no better error code available.

set_code(code)
Parameters:

code (int) – a code.

Sets self's code: the code is specific to the provider being used. If you want to have a common understanding of the event codes, use Gda.ConnectionEvent.get_gda_code() instead.

This function should not be called directly

set_description(description)
Parameters:

description (str or None) – a description, or None (to unset current description if any)

Sets self's description. This function should not be called directly.

set_event_type(type)
Parameters:

type (Gda.ConnectionEventType) – the severity of the event

Sets self's severity (from a simple notice to a fatal event) This function should not be called directly.

set_gda_code(code)
Parameters:

code (Gda.ConnectionEventCode) – a code

Sets self's gda code: that code is standardized by the libgda library. If you want to specify the corresponding provider specific code, use Gda.ConnectionEvent.get_code() or Gda.ConnectionEvent.get_sqlstate() instead.

This function should not be called directly

set_source(source)
Parameters:

source (str) – a source.

Sets self's source; this function should not be called directly

set_sqlstate(sqlstate)
Parameters:

sqlstate (str) – SQL state.

Changes the SQLSTATE code of self, this function should not be called directly

Sets self's SQL state.

Property Details

Gda.ConnectionEvent.props.type
Name:

type

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE

Connection event type