Add support for PreparedStatements to MySQL and PostgreSQL

Project:GNU Smalltalk
Component:DBI
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

Postgres and MySQL support PreparedStatements, but their DBD does not know about them.

This requires some refactoring. The first step would be to move parts of the FieldConverter (from the MySQL bindings) up to the generic DBI package.

Updates

#1 submitted by Daniele Sciascia on Thu, 06/05/2008 - 16:55
Attachment:sqlite_prepared_statements.patch (6.38 KB)

Here is a patch that adds prepared statements to SQLite bindings...

Daniele

#2 submitted by Paolo Bonzini on Fri, 06/06/2008 - 07:12
Title:Add support for PreparedStatements» Add support for PreparedStatements to MySQL and PostgreSQL

thanks, committed! (after adding support for named parameters)

#3 submitted by Paolo Bonzini on Fri, 06/06/2008 - 07:15

By the way, referring to the comment above:

> This requires some refactoring. The first step would be to move parts of the FieldConverter

This was already done for the ROE port. Daniele's implementation does not use the FieldConverter and does not allow for example to bind Dates to arguments -- but the low-level binding is indeed important, and the high-level stuff should probably be done in DBI, not in each driver.

User login