You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jason van Zyl <jv...@zenplex.com> on 2001/12/10 05:51:56 UTC
Torque and String quoting
Hi,
If anyone was watching, there was a little exchange on the commons mailing
list about string quoting for databases. After peeking at the SQL-92 spec is
appears that the single quote is a standard.
So how about making getStringDelimiter() in DB.java a concrete method
returning a single quote and removing all the getStringDelimiter() methods
in the subclasses of DB.java.
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Torque and String quoting
Posted by Russ Trotter <ru...@yahoo.com>.
A little bit related to this issue:
I'm trying to get the project-datadump and project-datasql targets
working. After looking at the generated XML for the project-datadump
target, I noticed that no escaping is done. More specifically, no
embedded single-quot (or double-quotes) are escaped. However, I realize
the syntax for this is probably non-standard,database-specific. Is
there a way to get DB adapter-like functionality into the
TorqueDataDumpTask?
After perusing the code, it would be great to have a little
lightweight adapter-like object stuffed in the context that the
TorqueDataDumpTask control template can just call something like:
<$table $column.Name="$dbEscapeString($column.Value)">
I would add this as a base class method in DB, but carrying around the
whole DBFactory into a TexenTask appeared to be a daunting task. Is
this my best option?
russ
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Torque and String quoting
Posted by John McNally <jm...@collab.net>.
+1
john mcnally
Jason van Zyl wrote:
>
> Hi,
>
> If anyone was watching, there was a little exchange on the commons mailing
> list about string quoting for databases. After peeking at the SQL-92 spec is
> appears that the single quote is a standard.
>
> So how about making getStringDelimiter() in DB.java a concrete method
> returning a single quote and removing all the getStringDelimiter() methods
> in the subclasses of DB.java.
>
> --
>
> jvz.
>
> Jason van Zyl
>
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>