[IronPython] Type analysis of expression

Christian Schmidt christian2.schmidt at gmx.de
Tue Oct 20 01:23:29 PDT 2009


Hi Vernon,

> Maybe I'm missing the point -- are you trying to load data into an 
> existing data table, or to DEFINE a new data table? 

Sorry for not clarifying this. I'm able to export to _new_ tables, which 
will be created at runtime.
For existing tables we could easily work out with the .NET-Convert 
mechanisms.

> 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.)  

We have restricted ourselves to Oracle, SQL Server and partly Access and 
we only use simple types (int, double, decimal Datetime, strings of 
varying size, ...)

> 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.

That's the point. In Excel the user does not have to worry about data 
types. Excel does it - although the result is not always satisfactory 
(e.g. with zip codes). And one further weakness of Excel is that the 
cells within a column do not have equal types.

Christian


More information about the Users mailing list