eric7.SqlBrowser.SqlBrowserWidget

Module implementing the SQL Browser widget.

Global Attributes

None

Classes

SqlBrowserWidget Class implementing the SQL Browser widget.

Functions

None


SqlBrowserWidget

Class implementing the SQL Browser widget.

Signals

statusMessage(str)
emitted to show a status message

Derived from

QWidget, Ui_SqlBrowserWidget

Class Attributes

cCount

Class Methods

None

Methods

SqlBrowserWidget Constructor
__deleteRow Private slot to delete a row from the database table.
__insertRow Private slot to insert a row into the database table.
addConnection Public method to add a database connection.
addConnectionByDialog Public slot to add a database connection via an input dialog.
executeQuery Public slot to execute the entered query.
on_clearButton_clicked Private slot to clear the SQL entry widget.
on_connections_cleared Private slot to clear the table.
on_connections_schemaRequested Private slot to show the schema of a table.
on_connections_tableActivated Private slot to show the contents of a table.
on_deleteRowAction_triggered Private slot handling the action to delete a row.
on_executeButton_clicked Private slot to execute the entered SQL query.
on_insertRowAction_triggered Private slot handling the action to insert a new row.
showSchema Public slot to show the schema of a table.
showTable Public slot to show the contents of a table.
updateActions Public slot to update the actions.

Static Methods

None

SqlBrowserWidget (Constructor)

SqlBrowserWidget(parent=None)

Constructor

parent (QWidget)
reference to the parent widget

SqlBrowserWidget.__deleteRow

__deleteRow()

Private slot to delete a row from the database table.

SqlBrowserWidget.__insertRow

__insertRow()

Private slot to insert a row into the database table.

SqlBrowserWidget.addConnection

addConnection(driver, dbName, user, password, host, port)

Public method to add a database connection.

driver (str)
name of the Qt database driver
dbName (str)
name of the database
user (str)
user name
password (str)
password
host (str)
host name
port (int)
port number
Return:
SQL error object
Return Type:
QSqlError

SqlBrowserWidget.addConnectionByDialog

addConnectionByDialog()

Public slot to add a database connection via an input dialog.

SqlBrowserWidget.executeQuery

executeQuery()

Public slot to execute the entered query.

SqlBrowserWidget.on_clearButton_clicked

on_clearButton_clicked()

Private slot to clear the SQL entry widget.

SqlBrowserWidget.on_connections_cleared

on_connections_cleared()

Private slot to clear the table.

SqlBrowserWidget.on_connections_schemaRequested

on_connections_schemaRequested(table)

Private slot to show the schema of a table.

table (str)
name of the table for which to show the schema

SqlBrowserWidget.on_connections_tableActivated

on_connections_tableActivated(table)

Private slot to show the contents of a table.

table (str)
name of the table for which to show the contents

SqlBrowserWidget.on_deleteRowAction_triggered

on_deleteRowAction_triggered()

Private slot handling the action to delete a row.

SqlBrowserWidget.on_executeButton_clicked

on_executeButton_clicked()

Private slot to execute the entered SQL query.

SqlBrowserWidget.on_insertRowAction_triggered

on_insertRowAction_triggered()

Private slot handling the action to insert a new row.

SqlBrowserWidget.showSchema

showSchema(table)

Public slot to show the schema of a table.

table (str)
name of the table to be shown

SqlBrowserWidget.showTable

showTable(table)

Public slot to show the contents of a table.

table (str)
name of the table to be shown

SqlBrowserWidget.updateActions

updateActions()

Public slot to update the actions.

Up