On Tuesday, September 27, 2022 at 8:39:47 PM UTC-4 Jeremy Evans wrote:
> On Tue, Sep 27, 2022 at 4:34 PM 'Charlie Pham' via sequel-talk <
> [email protected]> wrote:
>
>> I was able to get sequel_pg running on my local and got the same output
>> you did. Interesting that I am not able to reproduce.
>>
>> Setting ENV["NO_SEQUEL_PG"] = "true" in the testing environment I *was*
>> still able to to reproduce...
>>
>
> Was this before or after requiring sequel?
>
Ah, good callout. I wasn't properly setting the environment variable here.
I was able to correctly set the environment variable in the testing
environment *before* requiring sequel and can *no longer *reproduce the
issue (see output below). So, sequel_pg does seem to be the culprit on the
test environment for this flip-flopping behaviour.
DB.create_table(:foo){Integer :id; Time :t}
ds = DB[:foo](:foo)
ds.insert(*1*, *'*2021-11-07 01:35:44.443726*'*)
ds.insert(*2*, *'*2022-02-21 08:22:37.146317*'*)
ds.insert(*3*, *'*2021-03-23 08:36:22.655691*'*)
p ds.where(id: 1).get(:t)
p ds.where(id: 2).get(:t)
p ds.where(id: 1).get(:t)
p ds.where(id: 3).get(:t)
p ds.where(id: 1).get(:t)
*2021-11-07 01:35:44.443726 -0800*
2022-02-21 08:22:37.146317 -0800
*2021-11-07 01:35:44.443726 -0800*
2021-03-23 08:36:22.655691 -0700
*2021-11-07 01:35:44.443726 -0800*
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/bc944626-979b-41d7-9027-4cfdb58e896bn%40googlegroups.com.