On Tue, Feb 3, 2009 at 8:26 AM, Gaetan de Menten <[email protected]>wrote:
> > On Mon, Feb 2, 2009 at 23:47, aap <[email protected]> wrote: > > > I've an existing database (sqlite3), > > but I can't find a method in the documentation how to open the > > database > > and how to a class from the existing tables. > > I think you are looking for the autoload=True option. > > For some examples (not very good ones in this case, but probably still > useful), see: > > http://elixir.ematia.de/trac/browser/elixir/tags/0.6.1/tests/test_autoload.py I might be too stupid, but I see something about autoload, only class definitions and function definitions, no instances, so no example :-( what I'm looking for (but maybe I'm asking too much): DataBase_Name = 'D:/Data_Python_25/support/test_vl.db' from elixir import * metadata.bind = "sqlite:///" + DataBase_Name metadata.bind.echo = True # I'm looking for some statement like this : # without declaring the table classes Tabel_Info = metadata.Get_Table_Info () # At this point the metadata of the tables are loaded # So now I should have instances of each table # And as I know the table names of the existing databases # I should by now be able to get the records of a table called "Vragenlijsten", # where the column "name" has the value "CIS" for row in Vragenlijsten ( name = 'CIS' ) : print row Is this possible with Elixer ? thanks,Stef > > -- > Gaƫtan de Menten > http://openhex.org > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
