Skip to content

Commit

Permalink
5.0: Update django.db.models.sql.compiler (#2166)
Browse files Browse the repository at this point in the history
* 5.0: Update django.db.models.sql.compiler

* Update django-stubs/db/models/sql/compiler.pyi

---------

Co-authored-by: Nikita Sobolev <[email protected]>
  • Loading branch information
JaeHyuckSa and sobolevn authored May 19, 2024
1 parent de6d1fa commit 2224595
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion django-stubs/db/models/sql/compiler.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from uuid import UUID
from django.db.backends.base.base import BaseDatabaseWrapper
from django.db.backends.utils import CursorWrapper
from django.db.models.base import Model
from django.db.models.expressions import BaseExpression, Expression
from django.db.models.expressions import BaseExpression, Expression, Ref
from django.db.models.sql.query import Query
from django.db.models.sql.subqueries import AggregateQuery, DeleteQuery, InsertQuery, UpdateQuery
from django.utils.functional import cached_property
Expand All @@ -18,6 +18,9 @@ _ParamT: TypeAlias = str | int
_ParamsT: TypeAlias = list[_ParamT]
_AsSqlType: TypeAlias = tuple[str, _ParamsT]

class PositionRef(Ref):
def __init__(self, ordinal: str, refs: str, source: Expression) -> None: ...

class SQLCompiler:
query: Query
connection: BaseDatabaseWrapper
Expand Down
1 change: 0 additions & 1 deletion scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,6 @@ django.db.models.sql.Query.names_to_path
django.db.models.sql.Query.solve_lookup_type
django.db.models.sql.Query.table_alias
django.db.models.sql.XOR
django.db.models.sql.compiler.PositionRef
django.db.models.sql.compiler.SQLCompiler.__init__
django.db.models.sql.compiler.SQLCompiler.deferred_to_columns
django.db.models.sql.compiler.SQLCompiler.get_default_columns
Expand Down

0 comments on commit 2224595

Please sign in to comment.