Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-115145

Methods isNew() and isDeleted() for QSqlRecord.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • SQL Support
    • None

    Description

      As of now there are no clear method to understand status of database record:

      • is it fetched from database table or newly added by a user action;
      • was it deleted by the user or not.
        While Qt for sure internally tracks this status - it is clearly visible with magic markers "!" (deleted) and "*" (created) in vertical header of QTableView - there are no easy universal way to check this status in code.

      I propose only one possible solution.
      Another one was proposed in QTBUG-492 - to have a new Qt Role that would indicate status of given index - UNCHANGED, NEW, DELETED, MODIFIED.
      This thing was discussed for more then 10 years already but still not implemented while it should be a complex task as Qt already operates this data internally and the only thing to do is to give a read-only access to this data.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            starterkit Ivan Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes