Hi Ben, Are you aware of the Boulder Oracle Sprint branch? http://code.djangoproject.com/browser/django/branches/boulder-oracle-sprint
And more specifically, about the support for inspectdb it already has? http://code.djangoproject.com/browser/django/branches/boulder-oracle-sprint/django/db/backends/oracle/introspection.py If you are, I'm sorry for bothering you. But I want to make sure you don't duplicate work ;-) Ciao, - Matthias On Mar 25, 5:53 pm, "Ben Ford" <[EMAIL PROTECTED]> wrote: > Hi, > I've been playing with an Oracle database at work today and after a bit of > hacking I got inspectdb to work. I have to qualify this with the fact that I > know the square root of very little about Oracle, and I'm pretty sure what > I've done is a nasty hack at best. Could someone please clarify how the > DATA_TYPES_REVERSE works, specifically how you 're supposed to get from > get_table_description(table_name) to the numbers which are the keys in the > dictionary? > > FYI what I ended up doing was having get_table_description return > cursor.describe on the query "SELECT * FROM table_name WHERE ROWNUM > 1" and > using cx_Oracle.<field_type> (i.e. row[1]) as the keys in DATA_TYPES_REVERSE > (like the mysql backend does it). One thing that I did find slightly > confusing was that cx_Oracle only found 4 different types of fields when I > wrote a little script to to iterate through the fields in all of my > tables... This isn't an insignificant database (57 tables and 317 fields by > my count) so it seems strange to have so few data types in the schema? Once > again I'll qualify that with my lack of familiarity with Oracle (and > database design in general) and the fact that I didn't have time to dig in a > bit more thoroughly. > > Any information gratefully received :) > Ben > > -- > Regards, > Ben Ford > [EMAIL PROTECTED] > +628111880346 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
