<br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 8:46 AM, Alain Rastoul <span dir="ltr"><<a href="mailto:alr.dev@free.fr">alr.dev@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi Mariano,</font></div>
<div><font face="Arial" size="2">Yes, t</font><font face="Arial" size="2">hat is what is
expected, but in the case of SQLite, the column type changes to
SQLITE_NULL for nulls and that is a problem in squeakdbx now.</font></div>
<div><font face="Arial" size="2">I think column datatype should not be
stored in the resultset in the case of sqlite.</font></div>
<div><font face="Arial" size="2">Other databases don't behave this way (as far as I
can remember), </font><font face="Arial" size="2"><font face="Arial" size="2">so,
overriding moveNext for sqlite would probably be fine.</font></font></div>
<div><font face="Arial" size="2"> </font></div></div></blockquote><div><br>So yes. Something is needed for Sqlite so that the column type and friends are fetched for every raw or at least when there is an unknown. <br>At least there is a DBXSqlitePlatform that let you easily overwrite stuff ;)<br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff">
<div><font face="Arial" size="2">Cheers</font></div>
<div><font face="Arial" size="2">Alain</font></div>
<blockquote style="border-left:#000000 2px solid;padding-left:5px;padding-right:0px;margin-left:5px;margin-right:0px" dir="ltr">
<div>"Mariano Martinez Peck" <<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>>
a écrit dans le message de news: <a href="mailto:CAA+-=mWHq6X9JGz-5qTyb3z5ZqdUwMwBV06B5AEZ=ivZVE4u4g@mail.gmail.com" target="_blank">CAA+-=mWHq6X9JGz-5qTyb3z5ZqdUwMwBV06B5AEZ=ivZVE4u4g@mail.gmail.com</a>...</div><div><div>
</div><div class="h5">And
here: <a href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/C_API/Usage" target="_blank">http://www.linuxnetworks.de/doc/index.php/OpenDBX/C_API/Usage</a><br><br> I
can read:<br><br>"
<h2><span>Processing results </span></h2>
<p>After fetching a row, all values of this row are available for further
processing, as well as their name, length and type - but the name and the type
of a column won't change. Also the number of columns returned by <a title="OpenDBX/API/odbx column count" href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/API/odbx_column_count" target="_blank">odbx_column_count</a>()
is fixed for the whole result. </p><pre>int i;
for( i = 0; i < odbx_column_count( result ); i++ )
{
fprintf( stdout, "Name: %s\n", odbx_column_name( result, i ) );
fprintf( stdout, "Type: %d\n", odbx_column_type( result, i ) );
fprintf( stdout, "Length: %d\n", odbx_field_length( result, i ) );
fprintf( stdout, "Value: %s\n", odbx_field_value( result, i ) );
}
</pre>
<p><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>
Besides <a title="OpenDBX/API/odbx column type" href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/API/odbx_column_type" target="_blank">odbx_column_type</a>()
these functions don't return error codes. Instead, they return zero (<a title="OpenDBX/API/odbx field length" href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/API/odbx_field_length" target="_blank">odbx_field_length</a>())
or NULL (<a title="OpenDBX/API/odbx column name" href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/API/odbx_column_name" target="_blank">odbx_column_name</a>()
and <a title="OpenDBX/API/odbx field length" href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/API/odbx_field_length" target="_blank">odbx_field_length</a>()),
but you shouldn't check for those because these values are also valid return
values. </p>
<p>All numbers are returned as strings from the database regardless if they
are integers or floats. If you want to do arithmetic operations, you have to
convert them to their machine dependent binary representation first.
</p>"<br><br>
</div></div><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Aug 15, 2011 at 11:11 PM, Mariano Martinez Peck
<span dir="ltr"><<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>></span>
wrote:<br>
</div></div><blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>
<br>
<div class="gmail_quote"><div><div></div><div class="h5">
<div>On Mon, Aug 15, 2011 at 9:59 PM, Alain Rastoul <span dir="ltr"><<a href="mailto:alr.dev@free.fr" target="_blank">alr.dev@free.fr</a>></span> wrote:<br>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><u></u>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2">I finally found that when called in C with
the same api calls that those made by opendbx, sqlite correctly returns
datatype of columns when fetching rows, the problem is clearly that the
data type is stored in SQueakDBX column description for the resultset
the first time it fetches the first row.</font></div>
<div><font face="Arial" size="2">For sqlite, squeakdbx should call the sqlite
api to retrieve column datatype for each row and each colum while
fetching data.</font></div></div></blockquote></div>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>
Hi Alain. I am reading this: <a href="http://www.linuxnetworks.de/doc/index.php/OpenDBX/C_API/odbx_column_type" target="_blank">http://www.linuxnetworks.de/doc/index.php/OpenDBX/C_API/odbx_column_type</a><br><br>From
SqueakDBX, we send odbx_column_type ONCE PER RESULTSET. <br>You can see this
in #processNextResultSet:querySettings: that for every resultset it
sends
#processResultWithRows:resultHandle:querySettings:<br><br>Now.... should we
send odbx_column_type and friends ONCE PER RAW? As far as I can see, in
other databases we don't need to do that. But maybe we are wrong and you are
right. <br>Norbert?<br><br>Anyway, if you want to give it a try to Sqlite,
what about overwrite #moveNext: in SqlitePlatform and do something to
set the new type for every raw. <br><br>From what I can see, if the type
depends on each raw and it should be asked for every raw, then a design
change is needed so that we can move the description from the REsultSet to
the Raw :)<br> <br><br></div>
<div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">But it may have implications I don't
know. Perhaps squeakDbx could get only true object values (are
rawValues really needed) ?.</font></div></div></blockquote></div>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>Well,
it depends on the user needs. Now, a key point is what GLORP should use.
<br> </div>
<div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Or perhaps another solution would be to call
the sqlite api if the stored datatype is UNKNOWN in column description ...
(only for sqlite, but sounds like a bad
trick)</font></div></div></blockquote></div>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>sounds like a hask, but if it works it is at least a
valid workaround. <br> </div>
</div></div><div>
<div></div>
<div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff"><div><div></div><div class="h5">
<div><font face="Arial" size="2">I am perplexed ...</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Any idea is welcome</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Cheers </font></div>
<div><font face="Arial" size="2">Alain</font></div>
</div></div><blockquote style="border-left:#000000 2px solid;padding-left:5px;padding-right:0px;margin-left:5px;margin-right:0px">
<div>"Mariano Martinez Peck" <<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>>
a écrit dans le message de news: <a href="mailto:CAA+-=mW69g-MP3fQutJ9vVhAjRoP9eZdv5Z0Zkv9junYZeTyKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org" target="_blank">CAA+-=mW69g-MP3fQutJ9vVhAjRoP9eZdv5Z0Zkv9junYZeTyKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org</a>...</div>
<div><div></div><div class="h5"><br><br>
<div class="gmail_quote">
<div>On Sat, Aug 13, 2011 at 12:06 AM, Alain Rastoul <span dir="ltr"><<a href="mailto:alr.dev@free.fr" target="_blank">alr.dev@free.fr</a>></span>
wrote:<br></div>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><u></u>
<div bgcolor="#ffffff">
<div>
<div><font face="Arial" size="2">It doen't work.</font></div>
<div><font face="Arial" size="2">Howerver googling for opendbx msg00483, I
found</font></div></div>
<div>
<div></div>
<div>
<div>
<div><a href="http://www.mail-archive.com/libopendbx-devel-5NWGOfrQmnetEtDZOKyKiw@public.gmane.orgrge.net/msg00483.html" target="_blank">http://www.mail-archive.com/libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org/msg00483.html</a></div>
</div></div></div></div></blockquote>
<div>
<div></div>
<div>
<div><br>yes, that one :)<br> </div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff">
<div></div>
<div><font face="Arial" size="2">it seems to be the problem of the issue
10, and I think the same problem I
have..</font></div></div></blockquote>
<div><br>yes <br>Sorry, I cannot do more....
:(<br> </div></div></div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff">
<div>
<div></div>
<div>
<div><font face="Arial" size="2">Strange that it doesn't work with MSSQL
too..</font></div>
<div><font face="Arial" size="2"></font> </div></div></div>
<blockquote style="border-left:#000000 2px solid;padding-left:5px;padding-right:0px;margin-left:5px;margin-right:0px">
<div>
<div></div>
<div>
<div>"Mariano Martinez Peck" <<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>>
a écrit dans le message de news: <a href="mailto:CAA+-=mW4rwrLMhMAzsLhQ5zEWZBG_Jg=BF2dKu3wsxw0=io=iQ@mail.gmail.com" target="_blank">CAA+-=mW4rwrLMhMAzsLhQ5zEWZBG_Jg=BF2dKu3wsxw0=io=iQ@mail.gmail.com</a>...</div>
</div></div>
<div>
<div></div>
<div>
<div>
<div></div>
<div><br><br>
<div class="gmail_quote">On Fri, Aug 12, 2011 at 11:14 PM, Alain
Rastoul <span dir="ltr"><<a href="mailto:alr.dev@free.fr" target="_blank">alr.dev@free.fr</a>></span>
wrote:<br>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><u></u>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2"><font face="Times New Roman" size="3">I
used the following script (about 2 months ago I think ) in
Pharo 1.3<br></font></font></div>
<div><font face="Arial" size="2">"SqueakDBX"<br>Gofer new
squeaksource: 'MetacelloRepository';<br>package:
'ConfigurationOfSqueakDBX';<br>load.<br>ConfigurationOfSqueakDBX
project latestVersion load.<br><br>"GLORP"<br>Gofer new
squeaksource: 'MetacelloRepository';<br>package:
'ConfigurationOfGlorpDBX';<br>load.<br>ConfigurationOfGlorpDBX
project latestVersion load.<br><br></font></div></div></blockquote>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>Yes, you are using SqueakDBX ;) you will
move soon to DBXTalk :)<br> </div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">II use DBXTestCase for my test
with the code I send in my email (i</font><font face="Arial" size="2">s it ok for you?), but I will have alook at
DBXQueryTest too.<br>No problem to put it in the test suite - it
makes me remember that I still didn't</font> <font face="Arial" size="2">send my license agreement to Stephane but I will
do it asap... I hate papers ;-)</font></div></div></blockquote>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br>in our case we don't need that
;)<br> </div>
<blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2"><a href="http://www.mail-archive.com/libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org/msg00483.html" target="_blank"><font face="Times New Roman" size="3">http://www.mail-archive.com/libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org/msg00483.html</font></a><br>
The link is
broken</font> <br></div></div></blockquote>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br><a href="http://www.mail-archive.com/libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org/msg00483.html" target="_blank">http://www.mail-archive.com/libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org/msg00483.html</a>
<br></div></div><br></div></div>
<div>this one works?<br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br></div></div></div></blockquote></div></blockquote>
</div>
<div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br></div></div></div></blockquote></div></blockquote></div></div>
</div><div><div></div><div class="h5">
<div>
<div></div>
<div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br></div></div></div></div></blockquote></div><div><div></div><div class="h5">
<br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>
</div></div><p>
</p><hr>
<p></p>------------------------------------------------------------------------------<br>uberSVN's
rich system and user administration capabilities and model <br>configuration
take the hassle out of deploying and managing Subversion and <br>the tools
developers use with it. Learn more about uberSVN and get a free <br>download
at: <a href="http://p.sf.net/sfu/wandisco-dev2dev" target="_blank">http://p.sf.net/sfu/wandisco-dev2dev</a><br>
<p>
</p><hr>
<p></p><p></p><p></p></blockquote></div>
<br>------------------------------------------------------------------------------<br>
uberSVN's rich system and user administration capabilities and model<br>
configuration take the hassle out of deploying and managing Subversion and<br>
the tools developers use with it. Learn more about uberSVN and get a free<br>
download at: <a href="http://p.sf.net/sfu/wandisco-dev2dev" target="_blank">http://p.sf.net/sfu/wandisco-dev2dev</a><br>
<br>_______________________________________________<br>
libopendbx-devel mailing list<br>
<a href="mailto:libopendbx-devel@lists.sourceforge.net">libopendbx-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/libopendbx-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/libopendbx-devel</a><br>
<a href="http://www.linuxnetworks.de/doc/index.php/OpenDBX" target="_blank">http://www.linuxnetworks.de/doc/index.php/OpenDBX</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>