QueryBuilder widget

Query builder is a widget for visual query construction.

Features:

  • Query is built upon model
  • Query system features are retrieved with data model
  • Can be customized to create SQL query

Data model interface:
  createAggregation(self, parent)
Create child aggregation.
  createFieldCondition(self, parent)
Create field condition.
  delete(self, item)
Delete condition
  getAggregationType(self, item)
Return aggregation type for item
  getChildren(self, item)
Return aggregation children
  getField(self, item)
Return field of item
  getFieldOperation(self, item)
Return field operation
  getFieldsModel(self)
Return fields model for data model
  getFieldValue(self, item)
Return field value
  getParent(self, item)
Return parent item for given
  getRoot(self)
Return root condition
  invalidateFieldValue(self, item)
Invalidate field value
  isAggregation(self, item)
Return item is aggregation.
  setAggregationType(self, item, aggr_type)
Set aggregation type for item Must generate ItemChanged event with field as argument
  setField(self, item, field)
Set condition field.
  setFieldOperation(self, item, oper)
Set field condition operation
  setFieldsModel(self, model)
Called when user changed field model
  setFieldValue(self, item, value)
Set field value for given item