Release 1.1.8#2245
Open
waketzheng wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
Added
QuerySet.union()— SQL UNION query support for combining results from multiple QuerySets, including support for union across different models,union(all=True)for duplicates,order_by(),limit(), andcount(). (feat: add union query support #2146)postgresql://scheme as alias for asyncpg (feat: add postgresql:// scheme as alias for asyncpg #2154)QuerySet.contains()method to check if an object exists in a queryset. (feat: addcontains()operation toQuerySet#2163)DomainNameValidator,URLValidator, andEmailValidatorclasses for common validation patterns. (feat: add domain, URL and email validators #2167)Fixed
MigrationRecordernow uses parameterized queries; fixes MariaDB/MySQL rejecting ISO-8601applied_atvalues. (tortoise migratefails to insert migration info row into tortoise_migrations table when using MariaDB #2132)db_defaultonForeignKeyField/OneToOneFieldnow propagates to the underlying<fk>_idcolumn, soCREATE TABLEemits theDEFAULTclause for FK columns. (FK/O2Odb_defaultis dropped during_init_relations(CREATE TABLE omits DEFAULT on FK columns) #2199)db_defaulton FK/O2O dropped during_init_relations(Fixdb_defaulton FK/O2O dropped during_init_relations#2200)MigrationRecorderno longer emits tortoise's ownpkfieldDeprecationWarningwhen applying migrations; it now builds its bookkeeping model withprimary_key=True. (fix(migrations): useprimary_keyinstead of deprecatedpkinMigrationRecorder#2203)QuerySet.count()now matches the limited query result for the LIMIT/OFFSET edge cases: it returns0(instead of a negative number) whenoffset()exceeds the total row count, and0(instead of the total) forlimit(0). (fix: clamp count() at 0 when offset exceeds total #2208)CharField[str]) in Pyright/Pylance instead ofField[Unknown]; theField.__new__type-check stub now returnsSelf. (fix: improve type resolution for model field declarations #2216)TransactionContextnow returns aTransactionalDBClientinstead of a raw database connection. This change gives the correct inferred type for the transaction context. (Fix transaction typing #2232)New Contributors
db_defaulton FK/O2O dropped during_init_relations#2200Full Changelog: 1.1.7...1.1.8