Hi there,

I am new to Sequel and it looks really promising. Impressed so far.

I would like to define my Sequel models (linked to a database table) 
*before* the connection is established, is that possible?

    class Contact < Sequel::Model(:ZABCDRECORD)
    end

    class AddressBookImporter
      def open_archive(archive)
        Sequel.sqlite(archive)
      end
    end

Here I am trying to link the Contact model with the basic contact 
information table form the Address Book SQLite database. Sequel tells me:

    No database associated with Sequel::Model: have you called 
Sequel.connect or Sequel::Model.db= ?

I can move the Sequel.sqlite command all the way to the top to make it work 
off course but the whole idea is to load it later as I don't know in 
advance what Address Book archive will be loaded (= the path to the SQLite 
database is given as a parameter).

Thanks for the help!

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/rT4bjMhtHNoJ.
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/sequel-talk?hl=en.

Reply via email to