I forked sequel on github, added this feature but I am not at ease with rspec I can't make DummyDatabase working with any special adapter supporting temporary table: temporary table syntax is different so I put the code inside the mssql, oracle, mysql, postgresql and sqlite adapters, overloading create_table_sql_list method in DatabaseMethods Module. I don't know if there is an easier way but I didn't want to break anything forcing a common syntax not supported by all the databases.
Florent On 15 avr, 19:56, Florent <[email protected]> wrote: > thanks to point me where to look at. > I will try to do a patch for this small feature. > keep you posted > > Florent > > On 15 avr, 19:54, Jeremy Evans <[email protected]> wrote: > > > On Apr 15, 10:15 am, Florent <[email protected]> wrote: > > > > I would like to create with Sequel some models using temporary tables > > > but I didn't see in the create_table method or the Schema::Generator > > > argument a way to specify it. > > > Is there a way to do it or should I do it by hand ? > > > I don't think there is any issue adding this feature because there is > > > no impact for select/insert/update/delete queries. > > > Sequel doesn't currently support such an option, but it should be easy > > to add a :temp option to the Database#create_table. You should just > > have to modify the create_table_sql_list method to support the > > option. Do you want to work on a patch yourself? If not, I may get > > around to it, but a patch would probably speed things up. > > > Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
