On Monday, May 25, 2015 at 9:51:57 AM UTC-7, Rohit Amarnath wrote:
>
> I have a similar issue, but have a number of columns that have this double
> underscore issue. So I hijacked the SPLIT_SYMBOL_CACHE:
>
> DB.extend_datasets do
> def ignore_double_underscores
> columns.each do |col|
> if col.to_s.include?('__')
> Sequel.synchronize{Sequel::SPLIT_SYMBOL_CACHE[col] = [nil,
> col.to_s, nil]}
> end
> end
> end
> end
>
> ds.ignore_double_underscores
>
> Is there a better way?
>
If possible, wrap the symbol with Sequel.identifier:
Sequel.identifier(:a__b)
That will cause Sequel to treat it as a single identifier and not attempt
to split it.
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 http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.