LibreOffice: XSQLQueryComposer Interface Reference

LibreOffice LibreOffice 24.8 SDK API Reference

Loading...
Searching...
No Matches
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:

## Public Member Functions
string | getQuery ()
| returns the query used for composing.
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.
string | getComposedQuery ()
| returns the query composed with filters and sort criteria.
string | getFilter ()
| returns the currently used filter.
sequence< sequence< com::sun::star::beans::PropertyValue > > | getStructuredFilter ()
| returns the currently used filter.
string | getOrder ()
| returns the currently used sort order.
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.
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.
void | setFilter ([in] string filter) raises (com::sun::star::sdbc::SQLException)
| makes it possible to set a filter condition for the query.
void | setOrder ([in] string order) raises (com::sun::star::sdbc::SQLException)
| makes it possible to set a sort condition for the query.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## 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

  column | the column which is used to create a filter

Exceptions

  com::sun::star::sdbc::SQLException | if 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

  column | the column which is used to create an order part
  ascending | `TRUE` when the order should be ascending, otherwise `FALSE`

Exceptions

  com::sun::star::sdbc::SQLException | if 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

  filter | the filter to set

Exceptions

  com::sun::star::sdbc::SQLException | if 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

  order | the order part to set

Exceptions

  com::sun::star::sdbc::SQLException | if 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

  command | the command to set

Exceptions

  com::sun::star::sdbc::SQLException | if a database access error occurs.

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

- com/sun/star/sdb/XSQLQueryComposer.idl