# class toTemplateSQL

This class represent an item that when expanded will execute an SQL statement and create child items which are the result of the query. More...

Definition | `#include <totemplate.h>`
Inherits | toTemplateItem [public ]
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toTemplateSQL (toConnection &conn,toTemplateItem *parent, const QString &name,const QString &sql)
- toConnection & connection ()
- virtual toTemplateItem * createChild (const QString &name)
- virtual toQList parameters (void)
- virtual void expand (void)

## Detailed Description

This class represent an item that when expanded will execute an SQL statement and create child items which are the result of the query.

toTemplateSQL (toConnection &conn,toTemplateItem *parent, const QString &name,const QString &sql)

### toTemplateSQL

Create an item.

Parameters:

conn | Connection to query.
parent | Parent of this item.
name | Contents of the first column of the item.
sql | SQL statement, observe that it is in QCString format and you should use utf8 if converting from QString.

toConnection & connection ()

### connection

Get connection of this item.

Returns: Reference to connection.

toTemplateItem * createChild (const QString &name)

### createChild

[virtual]

Create a child of this item.

Parameters:

name | Name of the child.

Returns: A newly created item.

toQList parameters (void)

### parameters

[virtual]

Get parameters to pass to query.

Returns: List of strings to pass as input parameters to query

void expand (void)

### expand

[virtual]

Reimplemented for internal reasons.

Reimplemented from toTemplateItem.