[Building Sakai] Sakai BasicSQLService - Can we add dbUpdate() Methods?

Aaron Zeckoski azeckoski at unicon.net
Tue Jul 19 10:26:24 PDT 2011


SpringJDBC handles this very nicely. I would say it is better to just use that.
http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/jdbc/core/JdbcTemplate.html#update(java.lang.String)

Personally, I would to see us moving away from maintaining our own
ORM/DB-mapping thing in the longer run (where feasible anyway).

-AZ


On Tue, Jul 19, 2011 at 1:06 PM, csev <csev at umich.edu> wrote:
> Sakai's BasicSQL Service is missing the ability to handle UPDATE statements.  It contains a sequence methods:
>
> dbRead() - Returns a record set
> dbWrite() - Returns true/false based on success of the SQL statement
> 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 BasisSQLService.
>
> I would like to add dbUpdate() methods that are like dbWrite except that they return an integer number of records affected rather than a true/false return.
>
> Thoughts / comments / redirects?
>
> /Chuck
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list