Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39596

Add dbWriteCount method to BasicSqlService

    XMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.x
    • Fix Version/s: 2.9.x
    • Component/s: Kernel
    • Labels:

      Description

      Sakai's BasicSQL Service is missing the ability to handle UPDATE statements and return the number of affected rows. It contains a sequence methods:

      dbRead() - Returns a record set
      dbWrite() - Returns true/false based on success of the SQL statement that changes the DB
      dbInsert() - Similar to dbWrite - but returns the generated auto-increment key.

      Generally UPDATE statements are done with dbWrite() - it returns a true/false indicating if it worked or failed.

      Sometimes UPDATE semantics need to know the number of records affected in order to know if the UPDATE accomplished the desired results.

      As best I can tell, there is no way to accomplish this using the current BasicSQLService.

      I will add dbWriteCount() that functions like dbWrite except that they return an integer number of records affected rather than a true/false return.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  csev Charles Severance
                  Reporter:
                  csev Charles Severance
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration