sqlobject.tests.test_views module

class sqlobject.tests.test_views.PhoneCall(**kw)[source]

Bases: sqlobject.main.SQLObject

j = phone_call
minutes
phoneNumber
phoneNumberID
q = phone_call
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'toID': <ForeignKey b319a5ecL to>, 'minutes': <IntCol b319a72cL minutes>, 'phoneNumberID': <ForeignKey b319a70cL phoneNumber>}
columnList = [<SOForeignKey phoneNumberID connected to PhoneNumber>, <SOForeignKey toID connected to PhoneNumber>, <SOIntCol minutes>]
columns = {'toID': <SOForeignKey toID connected to PhoneNumber>, 'minutes': <SOIntCol minutes>, 'phoneNumberID': <SOForeignKey phoneNumberID connected to PhoneNumber>}
idName = 'id'
indexDefinitions = []
indexes = []
joinDefinitions = []
joins = []
soClass

alias of PhoneCall

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'phone_call'
to
toID
class sqlobject.tests.test_views.PhoneNumber(**kw)[source]

Bases: sqlobject.main.SQLObject

calls
incoming
j = phone_number
number
q = phone_number
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'number': <StringCol b3125dccL number>}
columnList = [<SOStringCol number>]
columns = {'number': <SOStringCol number>}
idName = 'id'
indexDefinitions = []
indexes = []
joinDefinitions = [<sqlobject.joins.SQLMultipleJoin object>, <sqlobject.joins.SQLMultipleJoin object>]
joins = [<sqlobject.joins.SOSQLMultipleJoin object>, <sqlobject.joins.SOSQLMultipleJoin object>]
soClass

alias of PhoneNumber

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'phone_number'
class sqlobject.tests.test_views.ViewPhone(**kw)[source]

Bases: sqlobject.views.ViewSQLObject

calls
j = view_phone
minutes
number
numberOfCalls
phoneNumber
phoneNumberID
q = (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone
class sqlmeta(instance)

Bases: sqlobject.declarative.sqlmeta

alias = 'view_phone'
childName = None
clause = ((phone_call.phone_number_id) = (phone_number.id))
columnDefinitions = {'numberOfCalls': <IntCol b3132c6cL numberOfCalls>, 'minutes': <IntCol b3132e4cL minutes>, 'number': <StringCol b313260cL number>, 'phoneNumberID': <ForeignKey b313274cL phoneNumber>}
columnList = [<SOIntCol minutes>, <SOIntCol numberOfCalls>, <SOStringCol number>, <SOForeignKey phoneNumberID connected to PhoneNumber>]
columns = {'numberOfCalls': <SOIntCol numberOfCalls>, 'minutes': <SOIntCol minutes>, 'number': <SOStringCol number>, 'phoneNumberID': <SOForeignKey phoneNumberID connected to PhoneNumber>}
idName = phone_number.id
indexDefinitions = []
indexes = []
joinDefinitions = [<sqlobject.joins.SQLMultipleJoin object>, <sqlobject.joins.SQLMultipleJoin object>]
joins = [<sqlobject.joins.SOSQLMultipleJoin object>, <sqlobject.joins.SOSQLMultipleJoin object>]
soClass

alias of ViewPhone

table = (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone
vCalls
class sqlobject.tests.test_views.ViewPhoneCall(**kw)[source]

Bases: sqlobject.views.ViewSQLObject

call
callID
j = view_phone_call
minutes
number
phoneNumber
phoneNumberID
q = (SELECT DISTINCT phone_call.id AS id, phone_call.minutes AS minutes, phone_number.number AS number, phone_number.id AS phoneNumberID, phone_call.id AS callID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_call
class sqlmeta(instance)

Bases: sqlobject.declarative.sqlmeta

alias = 'view_phone_call'
childName = None
clause = ((phone_call.phone_number_id) = (phone_number.id))
columnDefinitions = {'callID': <ForeignKey b312feecL call>, 'minutes': <IntCol b312fd0cL minutes>, 'number': <StringCol b312ff6cL number>, 'phoneNumberID': <ForeignKey b312f28cL phoneNumber>}
columnList = [<SOIntCol minutes>, <SOStringCol number>, <SOForeignKey phoneNumberID connected to PhoneNumber>, <SOForeignKey callID connected to PhoneCall>]
columns = {'callID': <SOForeignKey callID connected to PhoneCall>, 'minutes': <SOIntCol minutes>, 'number': <SOStringCol number>, 'phoneNumberID': <SOForeignKey phoneNumberID connected to PhoneNumber>}
idName = phone_call.id
indexDefinitions = []
indexes = []
joinDefinitions = []
joins = []
soClass

alias of ViewPhoneCall

table = (SELECT DISTINCT phone_call.id AS id, phone_call.minutes AS minutes, phone_number.number AS number, phone_number.id AS phoneNumberID, phone_call.id AS callID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_call
class sqlobject.tests.test_views.ViewPhoneInnerAggregate(**kw)[source]

Bases: sqlobject.tests.test_views.ViewPhone

j = view_phone_inner_aggregate
q = (SELECT view_phone_inner_aggregate_base.id AS id, view_phone_inner_aggregate_base.number AS number, view_phone_inner_aggregate_base.phoneNumberID AS phoneNumberID, view_phone_inner_aggregate_0.minutes AS minutes, view_phone_inner_aggregate_0.numberOfCalls AS numberOfCalls, view_phone_inner_aggregate_0.twiceMinutes AS twiceMinutes FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_inner_aggregate_base LEFT JOIN (SELECT phone_number.id AS view_phone_inner_aggregate_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls, ((SUM(phone_call.minutes)) * (2)) AS twiceMinutes FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_inner_aggregate_0 ON view_phone_inner_aggregate_base.id = view_phone_inner_aggregate_0.view_phone_inner_aggregate_0_id) view_phone_inner_aggregate
class sqlmeta(instance)

Bases: sqlobject.declarative.sqlmeta

alias = 'view_phone_inner_aggregate'
childName = None
columnDefinitions = {'numberOfCalls': <IntCol b3132c6cL numberOfCalls>, 'twiceMinutes': <IntCol b3131e8cL twiceMinutes>, 'minutes': <IntCol b3132e4cL minutes>, 'number': <StringCol b313260cL number>, 'phoneNumberID': <ForeignKey b313274cL phoneNumber>}
columnList = [<SOIntCol minutes>, <SOIntCol numberOfCalls>, <SOStringCol number>, <SOForeignKey phoneNumberID connected to PhoneNumber>, <SOIntCol twiceMinutes>]
columns = {'numberOfCalls': <SOIntCol numberOfCalls>, 'twiceMinutes': <SOIntCol twiceMinutes>, 'minutes': <SOIntCol minutes>, 'number': <SOStringCol number>, 'phoneNumberID': <SOForeignKey phoneNumberID connected to PhoneNumber>}
indexDefinitions = []
indexes = []
joinDefinitions = [<sqlobject.joins.SQLMultipleJoin object>, <sqlobject.joins.SQLMultipleJoin object>]
joins = []
soClass

alias of ViewPhoneInnerAggregate

table = (SELECT view_phone_inner_aggregate_base.id AS id, view_phone_inner_aggregate_base.number AS number, view_phone_inner_aggregate_base.phoneNumberID AS phoneNumberID, view_phone_inner_aggregate_0.minutes AS minutes, view_phone_inner_aggregate_0.numberOfCalls AS numberOfCalls, view_phone_inner_aggregate_0.twiceMinutes AS twiceMinutes FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_inner_aggregate_base LEFT JOIN (SELECT phone_number.id AS view_phone_inner_aggregate_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls, ((SUM(phone_call.minutes)) * (2)) AS twiceMinutes FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_inner_aggregate_0 ON view_phone_inner_aggregate_base.id = view_phone_inner_aggregate_0.view_phone_inner_aggregate_0_id) view_phone_inner_aggregate
twiceMinutes
class sqlobject.tests.test_views.ViewPhoneMore(**kw)[source]

Bases: sqlobject.views.ViewSQLObject

View on top of view

j = view_phone_more
minutesCalled
number
q = (SELECT view_phone_more_base.id AS id, view_phone_more_base.number AS number, view_phone_more_0.timesCalled AS timesCalled, view_phone_more_0.minutesCalled AS minutesCalled, view_phone_more_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) view_phone_more_base LEFT JOIN (SELECT view_phone.id AS view_phone_more_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) view_phone_more_0 ON view_phone_more_base.id = view_phone_more_0.view_phone_more_0_id LEFT JOIN (SELECT view_phone.id AS view_phone_more_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) view_phone_more_1 ON view_phone_more_0.view_phone_more_0_id = view_phone_more_1.view_phone_more_1_id) view_phone_more
class sqlmeta(instance)

Bases: sqlobject.declarative.sqlmeta

alias = 'view_phone_more'
childName = None
clause = ((view_phone.id) = (phone_call.to_id))
columnDefinitions = {'timesCalledLong': <IntCol b312862cL timesCalledLong>, 'minutesCalled': <IntCol b3128f8cL minutesCalled>, 'timesCalled': <IntCol b31326ecL timesCalled>, 'number': <StringCol b31328ccL number>}
columnList = [<SOStringCol number>, <SOIntCol timesCalled>, <SOIntCol timesCalledLong>, <SOIntCol minutesCalled>]
columns = {'timesCalledLong': <SOIntCol timesCalledLong>, 'minutesCalled': <SOIntCol minutesCalled>, 'timesCalled': <SOIntCol timesCalled>, 'number': <SOStringCol number>}
idName = view_phone.id
indexDefinitions = []
indexes = []
joinDefinitions = []
joins = []
soClass

alias of ViewPhoneMore

table = (SELECT view_phone_more_base.id AS id, view_phone_more_base.number AS number, view_phone_more_0.timesCalled AS timesCalled, view_phone_more_0.minutesCalled AS minutesCalled, view_phone_more_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) view_phone_more_base LEFT JOIN (SELECT view_phone.id AS view_phone_more_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) view_phone_more_0 ON view_phone_more_base.id = view_phone_more_0.view_phone_more_0_id LEFT JOIN (SELECT view_phone.id AS view_phone_more_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) view_phone_more_1 ON view_phone_more_0.view_phone_more_0_id = view_phone_more_1.view_phone_more_1_id) view_phone_more
timesCalled
timesCalledLong
class sqlobject.tests.test_views.ViewPhoneMore2(**kw)[source]

Bases: sqlobject.tests.test_views.ViewPhoneMore

j = vpm
q = (SELECT vpm_base.id AS id, vpm_base.number AS number, vpm_0.timesCalled AS timesCalled, vpm_0.minutesCalled AS minutesCalled, vpm_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) vpm_base LEFT JOIN (SELECT view_phone.id AS vpm_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) vpm_0 ON vpm_base.id = vpm_0.vpm_0_id LEFT JOIN (SELECT view_phone.id AS vpm_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) vpm_1 ON vpm_0.vpm_0_id = vpm_1.vpm_1_id) vpm
class sqlmeta(instance)

Bases: sqlobject.declarative.sqlmeta

alias = 'vpm'
childName = None
columnDefinitions = {'timesCalledLong': <IntCol b312862cL timesCalledLong>, 'minutesCalled': <IntCol b3128f8cL minutesCalled>, 'timesCalled': <IntCol b31326ecL timesCalled>, 'number': <StringCol b31328ccL number>}
columnList = [<SOStringCol number>, <SOIntCol timesCalled>, <SOIntCol timesCalledLong>, <SOIntCol minutesCalled>]
columns = {'timesCalledLong': <SOIntCol timesCalledLong>, 'minutesCalled': <SOIntCol minutesCalled>, 'timesCalled': <SOIntCol timesCalled>, 'number': <SOStringCol number>}
indexDefinitions = []
indexes = []
joinDefinitions = []
joins = []
soClass

alias of ViewPhoneMore2

table = (SELECT vpm_base.id AS id, vpm_base.number AS number, vpm_0.timesCalled AS timesCalled, vpm_0.minutesCalled AS minutesCalled, vpm_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) vpm_base LEFT JOIN (SELECT view_phone.id AS vpm_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) vpm_0 ON vpm_base.id = vpm_0.vpm_0_id LEFT JOIN (SELECT view_phone.id AS vpm_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) vpm_1 ON vpm_0.vpm_0_id = vpm_1.vpm_1_id) vpm
sqlobject.tests.test_views.checkAttr(cls, id, attr, value)[source]
sqlobject.tests.test_views.setup_module(mod)[source]
sqlobject.tests.test_views.testAliasOverride()[source]
sqlobject.tests.test_views.testColumnSQLVPC()[source]
sqlobject.tests.test_views.testDistinctCount()[source]
sqlobject.tests.test_views.testGetVP()[source]
sqlobject.tests.test_views.testGetVPC()[source]
sqlobject.tests.test_views.testGetVPM()[source]
sqlobject.tests.test_views.testInnerAggregate()[source]
sqlobject.tests.test_views.testJoinView()[source]
sqlobject.tests.test_views.testSelect()[source]
sqlobject.tests.test_views.testSelect2()[source]
sqlobject.tests.test_views.testSimpleVPC()[source]