LibreOffice LibreOffice 4.3 SDK API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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. 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

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.

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 a order part
  ascending | `TRUE` when the order should be ascending, otherwise `FALSE`

Exceptions

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

string getComposedQuery | ( |  | ) |

returns the query composed with filters and sort criteria.

Returns
  the composed query

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

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

string getQuery | ( |  | ) |

returns the query used for composing.

Returns
  the query

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

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.

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.

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