Public Member Functions

db_query_Editor Class Reference

a proxy to an instance of a connection to a DB server, equivalent to a SQL Editor tab. More...

#include <structs.db.query.h>

Inheritance diagram for db_query_Editor:
GrtObject

List of all members.

Public Member Functions

db_query_QueryBufferRef activeQueryBuffer () const
 Getter for attribute activeQueryBuffer (read-only).
db_query_ResultsetRef activeResultset () const
 Getter for attribute activeResultset (read-only).
db_mgmt_ConnectionRef connection () const
 Getter for attribute connection (read-only).
grt::StringRef defaultSchema () const
 Getter for attribute defaultSchema.
virtual void defaultSchema (const grt::StringRef &value)
 Setter for attribute defaultSchema.
grt::ListRef
< db_query_QueryBuffer
queryBuffers () const
 Getter for attribute queryBuffers (read-only).
grt::ListRef< db_query_Resultsetresultsets () const
 Getter for attribute resultsets (read-only).
virtual db_query_QueryBufferRef addQueryBuffer ()
 adds a new query buffer/text editor tab in the UI and return it
virtual grt::IntegerRef addToOutput (const std::string &text, long bringToFront)
 write a line of text into the SQL Editor output area
virtual
db_query_EditableResultsetRef 
createTableEditResultset (const std::string &schema, const std::string &table, const std::string &where, long showGrid)
 executes a SELECT statement on the table and returns an editable resultset that can be used to modify its contents
virtual grt::ListRef
< db_query_Resultset
executeScript (const std::string &sql)
 execute the script passed as argument
virtual grt::IntegerRef executeScriptAndOutputToGrid (const std::string &sql)
 execute the script passed as argument and displays the generated resultsets as grids in the UI

Detailed Description

a proxy to an instance of a connection to a DB server, equivalent to a SQL Editor tab.


This object cannot be instantiated directly.


Member Function Documentation

db_query_QueryBufferRef activeQueryBuffer (  )  const

Getter for attribute activeQueryBuffer (read-only).

query buffer that is currently selected

In Python:
value = obj.activeQueryBuffer
db_query_ResultsetRef activeResultset (  )  const

Getter for attribute activeResultset (read-only).

resultset that is currently selected in UI

In Python:
value = obj.activeResultset
virtual db_query_QueryBufferRef addQueryBuffer (  )  [virtual]

adds a new query buffer/text editor tab in the UI and return it

Returns:
the newly created query buffer proxy object
virtual grt::IntegerRef addToOutput ( const std::string &  text,
long  bringToFront 
) [virtual]

write a line of text into the SQL Editor output area

Parameters:
text 
bringToFront 
Returns:
db_mgmt_ConnectionRef connection (  )  const

Getter for attribute connection (read-only).

connection data

In Python:
value = obj.connection
virtual db_query_EditableResultsetRef createTableEditResultset ( const std::string &  schema,
const std::string &  table,
const std::string &  where,
long  showGrid 
) [virtual]

executes a SELECT statement on the table and returns an editable resultset that can be used to modify its contents

Parameters:
schema name of the table schema
table name of the table to edit
where not yet supported
showGrid whether the resultset should be displayed as a grid in the UI
Returns:
an editable resultset that can be used to modify the table contents
grt::StringRef defaultSchema (  )  const

Getter for attribute defaultSchema.

The default schema to use for queries (equivalent to USE schema)

In Python:
value = obj.defaultSchema
virtual void defaultSchema ( const grt::StringRef &  value  )  [virtual]

Setter for attribute defaultSchema.

The default schema to use for queries (equivalent to USE schema)

In Python:
obj.defaultSchema = value
virtual grt::ListRef<db_query_Resultset> executeScript ( const std::string &  sql  )  [virtual]

execute the script passed as argument

Parameters:
sql 
Returns:
the list of resultsets sent back by the server
virtual grt::IntegerRef executeScriptAndOutputToGrid ( const std::string &  sql  )  [virtual]

execute the script passed as argument and displays the generated resultsets as grids in the UI

Parameters:
sql 
Returns:
grt::ListRef<db_query_QueryBuffer> queryBuffers (  )  const

Getter for attribute queryBuffers (read-only).

list of open editor buffers. This list cannot be modified

In Python:
value = obj.queryBuffers
grt::ListRef<db_query_Resultset> resultsets (  )  const

Getter for attribute resultsets (read-only).

list of open resultsets. This list cannot be modified

In Python:
value = obj.resultsets