e.g. when use ActiveRecord, i can do where like this.
Event.where("payload->>'kind' = ?", "user_renamed")
For Sequel, i guess we have to do like this, right?
Event.where(Sequel.lit("payload->>'kind' = ?", "user_renamed"))
Why we need stick on add a Sequel.lit in this case when first arguments
Because i don't know what happen, so, i just try to reproduce here.
I use following migrate to add chinese full text search feature use
zhparser plugin, it works!
https://github.com/zw963/marketbet_crawler/blob/master/db/migrations/2022143230_add_zhparser_extension.rb
I use following
On Fri, Nov 19, 2021 at 1:28 AM Billy Zheng wrote:
> e.g. when use ActiveRecord, i can do where like this.
>
> Event.where("payload->>'kind' = ?", "user_renamed")
>
> For Sequel, i guess we have to do like this, right?
>
> Event.where(Sequel.lit("payload->>'kind' = ?", "user_renamed"))
>
> Why
Okay, i update my code, like this:
```
r.is 'add-ts-keyword' do
new_keyword = r.params['new_keyword']
if new_keyword.present?
DB.run(Sequel.lit("INSERT INTO zhparser.zhprs_custom_word
values(?) ON CONFLICT DO NOTHING;", new_keyword))
end
r.redirect
On Fri, Nov 19, 2021 at 8:15 AM Billy Zheng wrote:
> Because i don't know what happen, so, i just try to reproduce here.
>
> I use following migrate to add chinese full text search feature use
> zhparser plugin, it works!
>
>
>
On Fri, Nov 19, 2021 at 9:05 AM Billy Zheng wrote:
> Okay, i update my code, like this:
>
> ```
> r.is 'add-ts-keyword' do
> new_keyword = r.params['new_keyword']
>
> if new_keyword.present?
> DB.run(Sequel.lit("INSERT INTO zhparser.zhprs_custom_word
> values(?) ON
Hi Jeremy,
I'm working on something that has me a bit puzzled. I'd like to introduce
an association that depends on a provided value, or fall back to a default.
My plan is to overwrite the getter to accept an optional argument, and then
to pass it along. But using `super` won't work. I have a
On Fri, Nov 19, 2021 at 2:41 PM adam.me...@gmail.com <
adam.mediadr...@gmail.com> wrote:
> I've changed my position on this, more in favour of the migration.
> Recently, trying to share code snippets have become incredibly worse on
> Google; much more than I remember.
>
> But going by my
I've changed my position on this, more in favour of the migration.
Recently, trying to share code snippets have become incredibly worse on
Google; much more than I remember.
But going by my experience migrating the Unpoly community, I'd say it would
probably be easier to forget about the
On Fri, Nov 19, 2021 at 2:00 PM adam.me...@gmail.com <
adam.mediadr...@gmail.com> wrote:
> Hi Jeremy,
>
> I'm working on something that has me a bit puzzled. I'd like to introduce
> an association that depends on a provided value, or fall back to a default.
>
> My plan is to overwrite the getter
Oof. Precedence strikes again ;) I guess that's what I get for debugging
after a long week.
Thanks for catching that.
Adam
On Friday, November 19, 2021 at 6:02:07 PM UTC-5 Jeremy Evans wrote:
> On Fri, Nov 19, 2021 at 2:00 PM adam.me...@gmail.com
> wrote:
>
>> Hi Jeremy,
>>
>> I'm working
I'm having some trouble using nested_attributes in conjunction with the
tactical_eager_loading plugin.
Specifically, I'm trying to set a default value for a one_to_one
association in before_validation only if that association doesn't already
have an associated object via an update of a
Okay, i will do more research with add a trigger for find out this issue
caused by UPDATE statement invalid, or just stored generated column not
updated when do UPDATE, even, DB.run not works with Roda request?
will be in touch, thanks
在2021年11月20日星期六 UTC+8 上午1:38:06 写道:
> On Fri, Nov 19,
13 matches
Mail list logo