I meant to say: DB.pool.available_connections.first.create_function......
On Thursday, July 25, 2013 9:07:38 AM UTC-4, Heberto del Rio wrote:
>
> The point for me is, even in case it is decided not to implement this
> option in SQLite, how to have access to the SQLite::Database connection
> created when the user call Sequel.connect('sqlite://...') or Sequel.sqlite,
> so it is up to the user to call the create_function. The only way I have
> found (but that is due to my lack of knowledge on Sequel, I'm a newbie) is
> to do the following: DB.pool.first.create_function(...., but it is not
> clean, in my opinion. Is there any option on the framework to have access
> to the actual connection (after initialization) in order to do things like
> these?
>
> Thanks in advance
>
> Heberto del Rio
>
> On Wednesday, July 24, 2013 2:50:54 PM UTC-4, Jeremy Evans wrote:
>>
>> On Wednesday, July 24, 2013 11:24:20 AM UTC-7, Heberto del Rio wrote:
>>>
>>> I know there is a thread on this topic, but it is pretty old, back on
>>> 2010, and in my opinion there was no conclusion on what
>>> to do.
>>>
>>> Are there any new thoughts on the topic?
>>>
>>
>> According to http://www.sqlite.org/lang_expr.html:
>>
>> "The REGEXP operator is a special syntax for the regexp() user function.
>> No regexp() user function is defined by default and so use of the REGEXP
>> operator will normally result in an error message. If a application-defined
>> SQL function <http://www.sqlite.org/c3ref/create_function.html> named
>> "regexp" is added at run-time, that function will be called in order to
>> implement the REGEXP operator."
>>
>> I suppose Sequel could just use REGEXP operator on SQLite, and have
>> SQLite raise the exception if the regexp function isn't defined, but it
>> would still not work in the general case for almost all users. I'm not in
>> favor of that approach, but I'm open to considering it. If anyone feels
>> strongly one way or another, please reply so I can get some feedback.
>>
>> 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/groups/opt_out.