Re: Escaping placeholders, take 2

Ron Savage <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
Hi Darren

On 29/12/14 13:59, Darren Duncan wrote:
>
> The API could involve an 'attr' given when preparing a SQL statement or
> other appropriate places.
>
>    placeholder_escape_delimiters => [ '\{','}' ]
>    placeholder_escape_delimiters => [ '\{','}','\[',']' ]
>    placeholder_escape_delimiters => [ '\{{{','}}}' ]
>    placeholder_escape_delimiters => [ '{{{','}}}' ]
>
> In this way, the backslash is no longer special, or necessary, though I
> anticipate it would often still be used for the mnemonics.
>
> Rather, when the driver is parsing the SQL for placeholders, if it
> encounters any left delimiter strings, if will leave the following SQL
> unaltered until it encounters the corresponding right delimiter string,
> and then it looks for placeholders again.

Perhaps a job for https://metacpan.org/release/Text-Balanced-Marpa

-- 
Ron Savage - savage.net.au
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.