> On 12 Aug 2016, at 13:36, Blondeau Vincent <vincent.blond...@worldline.com> 
> wrote:
> 

> 
> I think that ' close the EXECUTE query and is not escaped by garage.

you are right. The statement is very sub-optimal (but should be easy to fix).

        "If not it means by the moment that we are a named prepared statement 
and we execute that"
        argumentsString := arguments
                ifEmpty: [ '' ]
                ifNotEmpty: [ '(''', (''', ''' join: (arguments collect: 
#asString)), ''')' ].

        ^ 'EXECUTE ', (self propertyAt: #statementId), argumentsString




In GNU Smalltalk[1] I had used FFI to use libpg/PQexecParams[2] that allows to 
pass query and parameters separately. Garage implements the wire protocol but 
it should be possible to pass the parameters separately as well. It should be 
simple to use/add this protocol.

holger

[1] 
https://github.com/zecke/gnu-smalltalk-debian/blob/master/packages/dbd-postgresql/Connection.st#L185
[2] https://www.postgresql.org/docs/9.1/static/libpq-exec.html

Reply via email to