Opened 4 years ago

Closed 3 years ago

#14898 closed Cleanup/optimization (wontfix)

Move validate_sql functionality into backend

Reported by: Xof Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3-alpha
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Right now, RawQuery.validate_sql does one thing: It statically checks to see if the query begins with "SELECT". In the case of some backends (such as PostgreSQL), other statements can return sets, like FETCH (from a cursor) and DO. It would be great to use those in raw queries as well. Rather than just building up a large list in the function, I suggest that the list be moved into the backend, or the actual guts of validate_sql be delegated to it.

Change History (5)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by jaddison

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:3 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:4 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:5 Changed 3 years ago by claudep

  • Resolution set to wontfix
  • Status changed from new to closed

There is no more validation on raw sql (see #14733).

Note: See TracTickets for help on using tickets.
Back to Top