> > There is no impedence mismatch.  Simply inadequate wattage by the
> person(s) solving the problem.  As I said, this problem has been solved
> with SQLite and Python for a decade.  So I would suggest the problem is
> that the wattage was so low, the lights were completely out.

> The impedence in the example is that on the sqlite side the type is
> numeric and on the R side it is of Date class.  It is impossible to
> know which sqlite numeric types are intended to represent dates and
> which are intended to represent numbers so when they are sent back to
> R there is no automatic assignment to Date class.  Either the
> programmer has to specify it (which is tedious) or else one has to
> rely on heuristics such as assuming that any output field having the
> same name as input field must also have the same type (but such
> heuristics do not cover all cases).
> 
> If you believe that python can know that a date is being returned from
> sqlite without the programmer specifying it even though sqlite has no
> date class, I suggest providing a self contained reproducible example
> of python code to illustrate it as I did with R.

It is a standard feature of pysqlite2 (the sqlite3 library shipped with 
Python).  I am quite sure you can read the documentation just as well as I can 
copy and paste it.  In short, you can use anything you like as the data type in 
sqlite.  You could specify that some column contains:

create table Developers
(
  count sillyGooses integer not null
);

You have now defined this to be of type sillyGooses integer.  It will have 
affinity integer.  WHen you read the column metadata you can find out that 
count is of type sillygooses and multiply the returned value count by Pi/e if 
that is the conversion factor required.

THe person writing the interface can even do this magically for you -- just 
like pysqlite / sqlite3 python libraries do.






Reply via email to