sqlobject.views module — SQLObject 3.9.1 documentation

# sqlobject.views module

class `sqlobject.views.` `ViewSQLObject`(**kw)

  Bases: `sqlobject.main.SQLObject`

  A SQLObject class that derives all it’s values from other SQLObject classes. Columns on subclasses should use SQLBuilder constructs for dbName, and sqlmeta should specify:

  - idName as a SQLBuilder construction

  - clause as SQLBuilder clause for specifying join conditions or other restrictions

  - table as an optional alternate name for the class alias

  See test_views.py for simple examples.

  `j` = view_sql_object
  `q` = view_sql_object
  class `sqlmeta`(instance)

    Bases: `sqlobject.main.sqlmeta`

    `childName` = None
    `idName` = 'id'
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.views.ViewSQLObject`

    `style` = <sqlobject.styles.MixedCaseUnderscoreStyle object>
    `table` = 'view_sql_object'

class `sqlobject.views.` `ViewSQLObjectField`(alias, *arg)

  Bases: `sqlobject.sqlbuilder.SQLObjectField`

  `tablesUsedImmediate`()

class `sqlobject.views.` `ViewSQLObjectTable`(soClass)

  Bases: `sqlobject.sqlbuilder.SQLObjectTable`

  `FieldClass`

    alias of `sqlobject.views.ViewSQLObjectField`

`sqlobject.views.` `isAggregate`(expr)