what is the 'extra' mean in this django code..

Posted by zjm1126 on Stack Overflow See other posts from Stack Overflow or by zjm1126
Published on 2010-04-05T06:50:41Z Indexed on 2010/04/05 6:53 UTC
Read the original article Hit count: 162

Filed under:
|
|
TOPIC_COUNT_SQL = """
SELECT COUNT(*)
FROM topics_topic
WHERE
    topics_topic.object_id = maps_map.id AND
    topics_topic.content_type_id = %s
"""
MEMBER_COUNT_SQL = """
SELECT COUNT(*)
FROM maps_map_members
WHERE maps_map_members.map_id = maps_map.id
"""

maps = maps.extra(select=SortedDict([
    ('member_count', MEMBER_COUNT_SQL),
    ('topic_count', TOPIC_COUNT_SQL),
]), select_params=(content_type.id,))

i don't know this mean,

thanks

© Stack Overflow or respective owner

Related posts about django

Related posts about sql