[IronPython] Type analysis of expression

Vernon Cole vernondcole at gmail.com
Mon Oct 19 22:33:19 CEST 2009

Maybe I'm missing the point -- are you trying to load data into an existing
data table, or to DEFINE a new data table?
  I was assuming the former, a fairly easy case.
If you are trying to create Data Definition Language to create a new table,
then you have a real challenge.  DDL is not well standardized, and you will
either need to have a great deal of knowledge about the capabilities of your
underlying database, or use only the simplest of data types. (Int, float,
and var-string would be about it.)  Introspection of a Python expression
would be the least of your problems. If columns must be nailed down to some
specific system data type, then, I suspect, the user will have to make the
decision for you, somewhat like a spreadsheet user does.

On Mon, Oct 19, 2009 at 1:52 PM, Christian Schmidt <
christian2.schmidt at gmx.de> wrote:

> Stephen,
>  Would it be possible to leave the columns as text then coerce at the
>> time the data is read from the database?  In other words, convert the
>> result of the python expression to a string and store the string in
>> the database.  Then, when the result is needed, coerce the string to
>> a more suitable type.  In other words, defer when the type needs to
>> be known until the value is used.
> This would not be an option, because a reading system is normally not
> pythonic. And it would not be very user friendly.
> In normal circumstances the result type should be very easily identifyable
> - at least for a programmer user...
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20091019/3ecdd9f5/attachment.html>

More information about the Ironpython-users mailing list