[fdo-internals] FdoParameterValue and FdoDataValue
Mateusz Loskot
mateusz at loskot.net
Mon Feb 26 21:18:16 EST 2007
Mateusz Loskot wrote:
> It will work, but I'm wondering if there is a another possibility,
> shorter. As I see, there is FdoDataValue::ToString() member function.
>
> What is the purpose of this ToString() ?
I've learned it and I'm quite sure I decrypted the purpose behind this
function :-)
What is a bit ambiguous about FdoDataValue and its specializations,
is that it's defined in Expression module, but in fact it's also used
in plain SQL commands too.
This also might mislead to assumption about value returned
by ToString().
For example, I've had no idea the ToString() for data type of string
will add extra quotes aroung string.
In PostgreSQL, for binding params no extra quotes are needed because
it's handled by libpq client library.
I see, there are also some variations of string representation
for FdoDateTimeValue.
I believe it's a good idea to provide a few words in the comment
block of ToString() header for these types, so a user is not
required to look into the implementation to find what out what values he
can expect.
If everyone agree, I can add these details and submit to the SVN.
Please, just give me a Go! or Stop!
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the fdo-internals
mailing list