Re: SQLite3::BusyException

2015-04-03 Thread Jeremy Evans
On Friday, April 3, 2015 at 2:49:46 AM UTC-7, Hiroyuki Sato wrote: Hello members. Question I'm using Sequel with Celluloid(https://celluloid.io) Celluloid is a multithread library for Ruby. And SQLite db is the file database. not on-memory db. I got

SQLite3::BusyException

2015-04-03 Thread Hiroyuki Sato
Hello members. Question I'm using Sequel with Celluloid(https://celluloid.io) Celluloid is a multithread library for Ruby. And SQLite db is the file database. not on-memory db. I got SQLite3::BusyException, so I would like to avoid this exception. It is possible to access

Appending custom SQL clause

2015-04-03 Thread Janko Marohnić
Hi Jeremy, I'm using Sequel in combination with Sphinx. Sphinx has it's own SphinQL, which is a limited version of MySQL. However, there is one clause that is SphinQL-specific, and doesn't exist in the SQL language: OPTION. Is it possible to somehow append it in Sequel? I want to generate this

Considering Removing Some Adapters

2015-04-03 Thread Jeremy Evans
I'm considering removing the following adapters from Sequel: * db2: Old db2 adapter that uses db2/db2cli, which I think only works on ruby 1.8. Passes tests, but extremely slowly (20 minutes per run). No reports of use, and any users should be able to switch to the ibmdb adapter. * dbi: Never

Allowing #limit to take virtual rows

2015-04-03 Thread Janko Marohnić
SphinxQL (the SQL dialect of Sphinx), supports LIMIT clause, but only the oldschool type, without OFFSET. So, instead of LIMIT 10 OFFSET 20 you have to write LIMIT 20, 10. I needed to do pagination, but I couldn't use the pagination extension because it includes the OFFSET (for all the normal

Re: Conditional Validation With Message

2015-04-03 Thread Jeremy Evans
On Friday, April 3, 2015 at 2:23:28 PM UTC-7, Elanor Riley wrote: Greetings! I have the following model in my code, but I cannot get the conditional validation on multiple columns to work with a custom message. class Form Sequel::Model(:requests) one_to_many :comments one_to_one

Re: Appending custom SQL clause

2015-04-03 Thread Janko Marohnić
Perfect! Thank you :) Janko On Fri, Apr 3, 2015 at 9:02 PM Jeremy Evans jeremyeva...@gmail.com wrote: On Friday, April 3, 2015 at 10:04:22 AM UTC-7, Janko Marohnić wrote: Hi Jeremy, I'm using Sequel in combination with Sphinx. Sphinx has it's own SphinQL, which is a limited version of

Conditional Validation With Message

2015-04-03 Thread Elanor Riley
Greetings! I have the following model in my code, but I cannot get the conditional validation on multiple columns to work with a custom message. class Form Sequel::Model(:requests) one_to_many :comments one_to_one :tour_guide def validate super validates_presence [:tour_guide,

Re: Allowing #limit to take virtual rows

2015-04-03 Thread Jeremy Evans
On Friday, April 3, 2015 at 1:21:23 PM UTC-7, Janko Marohnić wrote: SphinxQL (the SQL dialect of Sphinx), supports LIMIT clause, but only the oldschool type, without OFFSET. So, instead of LIMIT 10 OFFSET 20 you have to write LIMIT 20, 10. I needed to do pagination, but I couldn't use the

Re: SQLite3::BusyException

2015-04-03 Thread Hiroyuki Sato
Hello jeremy. Thank you for your comment. I wrote test program. It run two readers and writers. It access same table. Almost operation complete 0.005 sec. But sometime raise SQLite3::BusyException. so It take over 5sec. (red part). I have no idea why this operation lock database over