MCPcopy
hub / github.com/django/django / get_initial_alias

Method get_initial_alias

django/db/models/sql/query.py:1112–1124  ·  view source on GitHub ↗

Return the first alias for this query, after increasing its reference count.

(self)

Source from the content-addressed store, hash-verified

1110 )
1111
1112 def get_initial_alias(self):
1113 """
1114 Return the first alias for this query, after increasing its reference
1115 count.
1116 """
1117 if self.alias_map:
1118 alias = self.base_table
1119 self.ref_alias(alias)
1120 elif self.model:
1121 alias = self.join(self.base_table_class(self.get_meta().db_table, None))
1122 else:
1123 alias = None
1124 return alias
1125
1126 def count_active_tables(self):
1127 """

Callers 13

combineMethod · 0.95
build_filterMethod · 0.95
resolve_refMethod · 0.95
add_fieldsMethod · 0.95
as_sqlMethod · 0.80
setup_queryMethod · 0.80
get_default_columnsMethod · 0.80
_setup_joinsMethod · 0.80
single_aliasMethod · 0.80
as_sqlMethod · 0.80
pre_sql_setupMethod · 0.80

Calls 3

ref_aliasMethod · 0.95
joinMethod · 0.95
get_metaMethod · 0.95

Tested by

no test coverage detected