On Tuesday, January 8, 2013 4:31:49 PM UTC-7, Jeremy Evans wrote:
>
> You can get direct access to the underlying connection via 
> Database#synchronize:
>
>   DB.synchronize do |conn|
>
>     conn.enable_load_extension(1)    
> conn.load_extension("/usr/local/lib/extension.dylib")    
> conn.enable_load_extension(0)
>
>   end
>
> For a single threaded app, that's probably fine.  Note that for a 
> multi-threaded app, you would probably want to use an after_connect proc:
>
>   DB = Sequel.connect(..., :after_connect=>(proc do |conn|
>
>     conn.enable_load_extension(1)    
> conn.load_extension("/usr/local/lib/extension.dylib")    
> conn.enable_load_extension(0)
>
>   end))
>

Perfect, thanks Jeremy!

-- 
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/-/qBOmTs91LjkJ.
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