BindingSet Class Reference
from PyKDE4.soprano import *
Namespace: Soprano
Detailed Description
\class BindingSet bindingset.h Soprano/BindingSet
Represents one set of bindings in the result of a select query.
BindingSet is mostly a convenience class for caching of query results.
\sa QueryResultIterator
Methods | |
| __init__ (self) | |
| __init__ (self, Soprano.BindingSet other) | |
| QStringList | bindingNames (self) |
| bool | contains (self, QString name) |
| int | count (self) |
| insert (self, QString name, Soprano.Node value) | |
| Soprano.Node | operator [] (self, int offset) |
| Soprano.Node | operator [] (self, QString name) |
| replace (self, int offset, Soprano.Node value) | |
| replace (self, QString name, Soprano.Node value) | |
| Soprano.Node | value (self, int offset) |
| Soprano.Node | value (self, QString name) |
Method Documentation
| __init__ | ( | self ) |
Create an emtpy set.
| __init__ | ( | self, | ||
| Soprano.BindingSet | other | |||
| ) |
Copy constructor.
| QStringList bindingNames | ( | self ) |
- Returns:
- The names of the bound variables in this set.
| bool contains | ( | self, | ||
| QString | name | |||
| ) |
Check if a certain variable has a binding in this set.
- Parameters:
-
name The variable name.
- Returns:
- true if this set contains a binding for the variable name, false otherwise.
| int count | ( | self ) |
The number of bindings in this set.
- Returns:
- The number of bindings.
| insert | ( | self, | ||
| QString | name, | |||
| Soprano.Node | value | |||
| ) |
Insert a new binding into the set.
| Soprano.Node operator [] | ( | self, | ||
| int | offset | |||
| ) |
Get the binding for a variable by index.
This is equivalent to value(int) const.
| Soprano.Node operator [] | ( | self, | ||
| QString | name | |||
| ) |
Get the binding for a variable.
This is equivalent to value(const QString&) const.
| replace | ( | self, | ||
| int | offset, | |||
| Soprano.Node | value | |||
| ) |
Replaces a value in the binding set.
- Since:
- 2.3
| replace | ( | self, | ||
| QString | name, | |||
| Soprano.Node | value | |||
| ) |
Replaces a value in the binding set.
- Since:
- 2.3
| Soprano.Node value | ( | self, | ||
| int | offset | |||
| ) |
Get the binding for a variable by index.
- Parameters:
-
offset The index of the requested variable.
- Returns:
- The binding for the requested variable or and invalid node if offset is out of bounds, i.e. bigger or equal to count().
\sa QueryResultIterator.binding(int) const.
| Soprano.Node value | ( | self, | ||
| QString | name | |||
| ) |
Get the binding for a variable.
- Parameters:
-
name The name of the requested variable.
- Returns:
- The binding for the requested variable or and invalid node if the bindings do not contain the variable.
\sa QueryResultIterator.binding(const QString&) const.
KDE 4.3 PyKDE API Reference