LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XSQLQueryComposer Interface Referencepublished

should be provided by a tool which simplifies the handling with SQL select statements. More...

import"XSQLQueryComposer.idl";

Inheritance diagram for XSQLQueryComposer:
XInterface SQLQueryComposer

Public Member Functions

string getQuery ()
 returns the query used for composing. More...
 
void setQuery ([in] string command) raises (com::sun::star::sdbc::SQLException)
 sets a new query for the composer, which may be expanded by filters and sort criteria. More...
 
string getComposedQuery ()
 returns the query composed with filters and sort criteria. More...
 
string getFilter ()
 returns the currently used filter. More...
 
sequence< sequence< com::sun::star::beans::PropertyValue > > getStructuredFilter ()
 returns the currently used filter. More...
 
string getOrder ()
 returns the currently used sort order. More...
 
void appendFilterByColumn ([in] com::sun::star::beans::XPropertySet column) raises (com::sun::star::sdbc::SQLException)
 appends a new filter condition by a com::sun::star::sdb::DataColumn providing the name and the value for the filter. More...
 
void appendOrderByColumn ([in] com::sun::star::beans::XPropertySet column, [in] boolean ascending) raises (com::sun::star::sdbc::SQLException)
 appends an additional part to the sort order criteria of the select statement. More...
 
void setFilter ([in] string filter) raises (com::sun::star::sdbc::SQLException)
 makes it possible to set a filter condition for the query. More...
 
void setOrder ([in] string order) raises (com::sun::star::sdbc::SQLException)
 makes it possible to set a sort condition for the query. 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...
 

Detailed Description

should be provided by a tool which simplifies the handling with SQL select statements.

The interface can be used for composing SELECT statements without knowing the structure of the used query.

Member Function Documentation

◆ appendFilterByColumn()

void appendFilterByColumn ( [in] com::sun::star::beans::XPropertySet  column)
raises (com::sun::star::sdbc::SQLException
)

appends a new filter condition by a com::sun::star::sdb::DataColumn providing the name and the value for the filter.

Parameters
columnthe column which is used to create a filter
Exceptions
com::sun::star::sdbc::SQLExceptionif a database access error occurs.

◆ appendOrderByColumn()

void appendOrderByColumn ( [in] com::sun::star::beans::XPropertySet  column,
[in] boolean  ascending 
)
raises (com::sun::star::sdbc::SQLException
)

appends an additional part to the sort order criteria of the select statement.

Parameters
columnthe column which is used to create an order part
ascendingTRUE when the order should be ascending, otherwise FALSE
Exceptions
com::sun::star::sdbc::SQLExceptionif a database access error occurs.

◆ getComposedQuery()

string getComposedQuery ( )

returns the query composed with filters and sort criteria.

Returns
the composed query

◆ getFilter()

string getFilter ( )

returns the currently used filter.

The filter criteria returned is part of the where condition of the select command, but it does not contain the where token.

Returns
the filter

◆ getOrder()

string getOrder ( )

returns the currently used sort order.

The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword .

Returns
the order

◆ getQuery()

string getQuery ( )

returns the query used for composing.

Returns
the query

◆ getStructuredFilter()

sequence< sequence<com::sun::star::beans::PropertyValue> > getStructuredFilter ( )

returns the currently used filter.

The filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria with the name of the column and the filter condition. The filter condition is of type string.

Returns
the structured filter

◆ setFilter()

void setFilter ( [in] string  filter)
raises (com::sun::star::sdbc::SQLException
)

makes it possible to set a filter condition for the query.

Parameters
filterthe filter to set
Exceptions
com::sun::star::sdbc::SQLExceptionif a database access error occurs.

◆ setOrder()

void setOrder ( [in] string  order)
raises (com::sun::star::sdbc::SQLException
)

makes it possible to set a sort condition for the query.

Parameters
orderthe order part to set
Exceptions
com::sun::star::sdbc::SQLExceptionif a database access error occurs.

◆ setQuery()

void setQuery ( [in] string  command)
raises (com::sun::star::sdbc::SQLException
)

sets a new query for the composer, which may be expanded by filters and sort criteria.

Parameters
commandthe command to set
Exceptions
com::sun::star::sdbc::SQLExceptionif a database access error occurs.

The documentation for this interface was generated from the following file: