Personally I think from(:table).truncate seems odd. Maybe that's because you would normally not have a FROM clause in a truncate statement. self[:table].truncate seems more compatible with SQL. same goes for the insert as it seems like a insert into.
Of course truncate(:table) might be best. On Sun, Oct 22, 2017 at 6:48 AM, Jeremy Evans <[email protected]> wrote: > On Friday, October 20, 2017 at 10:20:16 PM UTC-7, Tim Uckun wrote: >> >> Why is "from" the preferred method? >> > > self in this case is the Database instance the migration is running on. > You could use self[:geometry_types] instead of from(:geometry_types), but > that looks a bit odd. > > Thanks, > Jeremy > > -- > You received this message because you are subscribed to the Google Groups > "sequel-talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sequel-talk. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
