[Building Sakai] Sakai BasicSQLService - Can we add dbUpdate() Methods?
Steve Swinsburg
steve.swinsburg at gmail.com
Tue Jul 19 17:11:07 PDT 2011
I agree, use Spring JDBC if you want to manage your own SQL statements. It handles the rest.
cheers,
Steve
On 20/07/2011, at 3:26 AM, Aaron Zeckoski wrote:
> 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
> _______________________________________________
> 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"
More information about the sakai-dev
mailing list