tortoise / tortoise/tortoise-orm

NULLORDER

Open
#1,417 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

tortoise-orm --> Microsoft SQL Server

ORM send select:
SELECT "id","intro","avatar","username","created_at","password","email" FROM "admin" WHERE "id" IS NULLORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 2 ROWS ONLY

must be:
SELECT "id","intro","avatar","username","created_at","password","email" FROM "admin" WHERE "id" IS NULL ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 2 ROWS ONLY

NULLORDER and NULL ORDER

How to fix it? Where to look?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by reproducing the Microsoft SQL Server query and trace the ORM's SQL generation for the NULL predicate and ORDER BY boundary. Done means the generated SQL contains IS NULL ORDER BY and a regression test covers this query.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.