LibreOffice
LibreOffice 24.2 SDK API Reference
|
implements a component which allows the creation of SQL statements. More...
import"QueryDesign.idl";
Exported Interfaces | |
interface | com::sun::star::frame::XController |
allows the component to be plugged into frames. More... | |
interface | com::sun::star::lang::XInitialization |
is used to initialize the QueryDesign. More... | |
Public Attributes | |
string | ActiveCommand |
reflects the designed SQL command at the moment it was last saved by the user. More... | |
boolean | EscapeProcessing |
specifies whether the user enabled escape processing for the statement being designed. More... | |
Additional Inherited Members | |
Public Member Functions inherited from XController | |
void | attachFrame ([in] XFrame Frame) |
is called to attach the controller with its managing frame. More... | |
boolean | attachModel ([in] XModel Model) |
is called to attach the controller to a new model. More... | |
boolean | suspend ([in] boolean Suspend) |
is called to prepare the controller for closing the view More... | |
any | getViewData () |
provides access to current view status More... | |
void | restoreViewData ([in] any Data) |
restores the view status using the data gotten from a previous call to XController::getViewData(). More... | |
XModel | getModel () |
provides access to currently attached model More... | |
XFrame | getFrame () |
provides access to owner frame of this controller More... | |
Public Member Functions inherited from XComponent | |
void | dispose () |
The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More... | |
void | addEventListener ([in] XEventListener xListener) |
adds an event listener to the object. More... | |
void | removeEventListener ([in] XEventListener aListener) |
removes an event listener from the listener list. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
Public Member Functions inherited from XInitialization | |
void | initialize ([in] sequence< any > aArguments) raises ( com::sun::star::uno::Exception ) |
initializes the object. More... | |
implements a component which allows the creation of SQL statements.
This service implements a user interface for creating SQL statements either through a graphical design interface or simply to enter the SQL statement directly.
The design view of the QueryDesign is divided into two parts. The first part contains the table windows where columns can be selected for the SQL statement. The second part contains the columns which should appear in the selection of the SQL statement or criteria which narrow the query.
A QueryDesign
component has 3 operation modes, which control what kind of object is edited:
Query Mode
In Query Mode
, the designer is used to modify an existing or create a new client-side query.
<a name="view_mode"View Mode
In View Mode
, the designer is used to modify an existing or create a new server-side view.
The view which is being designed must support the com::sun::star::sdbcx::XAlterView interface, except when a new view is being designed. In the latter case, the designer closes itself automatically when XAlterView
is not supported, and the view has been saved.
<a name="command_mode"Command Mode
In Command Mode
, the designer is used to design an standalone SQL command.
The client of the designer is then responsible to listen at changes in the ActiveCommand and EscapeProcessing members, which are updated every time the user saves the command.
Initialization is done using the com::sun::star::lang::XInitialization interface, which expects a sequence of objects being either com::sun::star::beans::NamedValues or com::sun::star::beans::PropertyValues. The following parameters are supported at initialization time:
Frame
has to be a com::sun::star::frame::XFrame interface specifying the frame to plug the QueryDesign component into.
This parameter is mandatory.
DataSourceName
specifies the name of the globally registered DataSource for which a query, view, or SQL command is to be designed.
The DataSourceName may be omitted if and only if a valid ActiveConnection parameter is present.
If both DataSourceName
and ActiveConnection
are present, the former is ignored.
ActiveConnection
specifies the connection to work with.
May be omitted if and only if a valid DataSourceName parameter is supplied.
Command
specifies the name of the query or view to design, or, in case of the CommandType being CommandType::COMMAND, the initial SQL command.
If this parameter is not present, a new query/view will be designed, respectively the initial command will be empty.
CommandType
specifies the type of object which should be designed. The following options are supported:
CommandType::QUERY specifies the designer should operate in query mode, that is, an existing client-side query should be designed, or a new query should be created, depending on the presence of the Command parameter.
If the DataSourceName parameter is present, the query is looked up in the specified data source. Otherwise, the designer tries to determine the data source which the ActiveConnection belongs to, and looks up the query there.
CommandType::COMMAND specifies the designer should operate in command mode, that is, a standalone SQL command should be designed. When the user attempts to save the designed SQL statement, the ActiveCommand and EscapeProcessing properties of the designer are updated.
If not present, this parameter defaults to CommandType::QUERY.
EscapeProcessing
Specifies whether or not escape processing should be initially enabled in the query designer. If set to FALSE
, then the designer can operate in text view only (as opposed to the graphical view). The GraphicalDesign parameter will be ignored then, and assumed to be FALSE
.
If not present, TRUE
is assumed for this parameter.
TRUE
) or in the text view (FALSE
).FALSE
is assumed for this parameter. There's a number of legacy settings which are recognized for compatibility reasons, though you're discouraged from using them:
CurrentQuery
is the same as Command, and implies a CommandType of CommandType::QUERY
QueryDesignView
is the same as GraphicalDesign.
IndependentSQLCommand
is the same as Command, and implies a CommandType of CommandType::COMMAND
interface com::sun::star::frame::XController |
allows the component to be plugged into frames.
interface com::sun::star::lang::XInitialization |
is used to initialize the QueryDesign.
See chapter Initialization for details.
|
propertyreadonly |
reflects the designed SQL command at the moment it was last saved by the user.
|
optionalpropertyreadonly |
specifies whether the user enabled escape processing for the statement being designed.