Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Jeremy Evans
On Sun, Nov 21, 2021 at 7:15 PM Billy Zheng wrote: > > Sad, in my ability, there is no way can reproduce this if not use > zhparser. > Unfortunately, I won't be able to help debug in that case. > > i still consider some incompatible things exists when do UPDATE use > DB.run on sequel, e.g.

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Billy Zheng
In fact, not too many ... it just 1. add a zhparser ts config use pg extension, 2. add a stored generated column column to generate tsvector column (“美元” is not as lexor token) 3. Use following code to add "美元“ as lex token DB.run(Sequel.lit("INSERT INTO zhparser.zhprs_custom_word

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Billy Zheng
what i means is thread pool issue, use same thread run several SQL may not work on rarely situation. maybe when run update statement need use a new connection to make previous "SELECT sync_zhprs_custom_word()" take effect? 在2021年11月23日星期二 UTC+8 上午3:20:11 写道: > In fact, not too many ... it

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Jeremy Evans
On Mon, Nov 22, 2021 at 11:42 AM Billy Zheng wrote: > > Hi, Jeremy, i upload a .png attachment, please have a look, that is a > screenshot on zhparser github repo. > https://github.com/amutu/zhparser#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%8D%E5%BA%93-21 > > that may explain why Sequel not work with

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Billy Zheng
Hi, Jeremy, after do some research, i can reproduce same (expected) behavior as ruby-pg gem. I add one code like this, i guess it means always create a new thread to run following SQL statement. sequel-5.50.0/lib/sequel/connection_pool/threaded.rb:139 def acquire(thread) + return

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Jeremy Evans
On Mon, Nov 22, 2021 at 10:27 AM Billy Zheng wrote: > Hi, Jeremy, after do some research, i can reproduce same (expected) > behavior as ruby-pg gem. > > I add one code like this, i guess it means always create a new thread to > run following SQL statement. > >

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Billy Zheng
> I cannot see why the first two would cause a problem, but maybe the last one does? You can turn that off via the :use_iso_date_format=>false option when setting up your Database connection. I consider not caused by those option, because following code still not work. (after revert above

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Jeremy Evans
On Mon, Nov 22, 2021 at 10:55 AM Billy Zheng wrote: > > I cannot see why the first two would cause a problem, but maybe the last > one does? You can turn that off via the :use_iso_date_format=>false option > when > setting up your Database connection. > > I consider not caused by those option,

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Billy Zheng
> In order not to block the interpreter, Sequel uses #async_exec and not #exec on the PG::Connection. Perhaps that's the cause of the problem? Do you get the same results as Sequel if you use #async_exec on the PG::Connection (with #block afterward)? After change from db =

Re: Trouble using nested_attributes and tactical_eager_loading together

2021-11-22 Thread s.brimd...@gmail.com
Thanks for your quick response and fix! I think adding the default in after_save should work just fine. Happy to hear that the example helped fix the bug. Sequel has been a pleasure to work with so I'm glad to be able to contribute in any way I can! On Saturday, November 20, 2021 at 12:04:10

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Jeremy Evans
On Mon, Nov 22, 2021 at 8:57 AM Billy Zheng wrote: > > In order not to block the interpreter, Sequel uses #async_exec and not > #exec on the PG::Connection. Perhaps that's the cause of the problem? Do > you get the same results as Sequel if you use #async_exec on the > PG::Connection (with

Re: DB.run("UPDATE investing_latest_news SET title = title, preview = preview;") not work done invoke with roda request?

2021-11-22 Thread Billy Zheng
> If you need to disconnect and reconnect to see changes when using zhparser, that sounds like a bug in zhparser that they should fix. Okay, anyway, i thought we identify the source of this issue finally. I even reproduce this from web, every time before i want to refresh stored generated