On Fri, Aug 12, 2016 at 01:36:21PM +0200, Blondeau Vincent wrote:
> > Which database?
> Postgres
PostgresV2 driver does not support the PostgreSQL extended query protocol
which allows prepared statements, AFAIK.
https://www.postgresql.org/docs/current/static/protocol-overview.html.
As for
Hi Vincent,
I don't know which special characters are you trying to escape, but if
simply send printString to the variable, it will escape any quote that
would end the string literal.
| variable statement |
variable := 'Pharo''s O''Reilly book'.
statement := 'SELECT ', variable printString.
> On 12 Aug 2016, at 13:36, Blondeau Vincent
> 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
> -Message d'origine-
> De : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] De la part de
> Holger Freyther
> Envoyé : vendredi 12 août 2016 13:22
> À : Any question about pharo is welcome
> Objet : Re: [Pharo-users] [Garage] How to espace sql special chars in a query?
>
>
> > On
> On 12 Aug 2016, at 12:10, Blondeau Vincent
> wrote:
>
> BTW, even with prepared statements, it doesn't work either:
> SQL query : EXECUTE preparedStmtd2qbaa1ap7ceiaq643sxlkyyw('Quand
> l'utilisateur est connecté sur "son serveur"', '1277')
> -> 'ERREUR:
BTW, even with prepared statements, it doesn't work either:
SQL query : EXECUTE preparedStmtd2qbaa1ap7ceiaq643sxlkyyw('Quand l'utilisateur
est connecté sur "son serveur"', '1277')
-> 'ERREUR: erreur de syntaxe sur ou près de « utilisateur » au caractère 56'
(Syntax error near char 56)
Vincent
One possibility is to move the assertions to another method and have each test
method invoke that method with a specific input.
For example
testPacketA
self assertJitterIn: #( 1 2 3 4) equals: 42
Best regards,
Henrik
-Original Message-
From: Pharo-users
Hi,
Prepared statements can be a solution but I would like to have a simpler one.
In the worst case, I may use that.
Vincent
> -Message d'origine-
> De : Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] De la part de
> Holger Freyther
> Envoyé : vendredi 12 août 2016 10:45
> À :
> On 12 Aug 2016, at 10:34, Blondeau Vincent
> wrote:
>
> Hello,
Hi
> I am looking for a method that escape special characters for SQL queries.
> E.g.: I want to escape : ‘ in a where expression: ‘….Where field1 = ‘’‘,
> myvariable , ‘‘’ …..’ with
Hello,
I am looking for a method that escape special characters for SQL queries.
E.g.: I want to escape : ' in a where expression: 'Where field1 = ''',
myvariable , ''' .' with myvariable := 'don''t do'.
I am using garage and haven't found it in the package. Does someone know where
I
Hi,
I have a test/algorithm that I would like to test with different sets of input
(and matching expected) output.
Let's imagine I write a protocol library for the RTP streaming protocol and
would like to verify my implementation of sequence number wrapping and jitter
delay, e.g. the
11 matches
Mail list logo