Re: validation_helpers

2023-10-29 Thread bee...@gmail.com
xists in > Rails/ActiveRecord; I'm not sure it exists in Sequel. > > On Sunday, October 29, 2023 at 11:40:32 AM UTC+1 bee...@gmail.com wrote: > >> For some reason I can't get the validation_helpers to load: >> >> >> In the models loader: >> *Sequel

validation_helpers

2023-10-29 Thread bee...@gmail.com
For some reason I can't get the validation_helpers to load: In the models loader: *Sequel::Model.plugin :validation_helpers* Models are loaded after helpers. Inside the class that's been working: *plugin :validation_helpers* Error: *undefined method `before_validation' for Carrier:Class* It s

Re: Password Field Auto-Encryption?

2023-09-27 Thread bee...@gmail.com
I reassigned that *Gen.pw* to *Gen.smallpw* and everything works fine. So somehow that module method is getting confused. Is there anything you need me to try, provide? On Tuesday, September 26, 2023 at 12:56:12 PM UTC-4 bee...@gmail.com wrote: > And yes, very much so, I simplified

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
And yes, very much so, I simplified my script to a fixed string, etc. So I tried items upstream in my development stack. On Tuesday, September 26, 2023 at 12:53:06 PM UTC-4 bee...@gmail.com wrote: > Well, doing some hunting, I have a method conflict somehow that I have > found.

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
of an instance and the clarity of the *Module.methodname* decipher between the two? I'm assuming namespaces are managed so this confusion would not occur. On Tuesday, September 26, 2023 at 11:54:55 AM UTC-4 Jeremy Evans wrote: > On Tue, Sep 26, 2023 at 6:53 AM bee...@gmail.com wrote

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
$/cy3nt)!\xn!nr\d]e:$hz+cjxk4(4h$/cy3nt)!\xn!nr\d]e:$hz+cjxk4(4h$/cy3nt)!\xn!nr\d]e:$hz+cjxk4(4h$/cy3nt)!\xn!nr\d]e:$hz+cjxk4(4h$/cy3nt)!\xn!nr\d]e:$h* On Tuesday, September 26, 2023 at 9:40:11 AM UTC-4 bee...@gmail.com wrote: > Even with a fixed String for *a.pw <http://a.pw>* assignment,

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
Even with a fixed String for *a.pw* assignment, it still happens. *if false pwtemp = Gen.pw(24).to_selse pwtemp = 'z+cjxk4(4h$/cy3nt)!\xn!nr\d]e:$h'end* On Tuesday, September 26, 2023 at 5:58:50 AM UTC-4 bee...@gmail.com wrote: > I'm seeing that *Gen.pw* which is m

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
I'm seeing that *Gen.pw* which is my string generator, won't work for you. I've tested it in my dev setup and it works: *a = Gen.pwputs a # ==> Moveslgmputs a # ==> Moveslgmputs a # ==> Moveslgm* In the case that *a.pw* is assigned *pwtemp*, *pwtemp* behaves like a reference so it gets eval

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
Maybe I should have posted the output. *### Record generation# 1{ :uname => "jordan769"}1 a.pw: xuwgrsqfbapvusegxdkcwmEthnoiKlyq2 a.pw: coMbjszE3 a.pw: ojvsWate#

Re: Password Field Auto-Encryption?

2023-09-26 Thread bee...@gmail.com
# 2'ap a10.times { puts a.pw } # Why does this value change on every iteration?* Hopefully that will run for you. For some reason that property is changing without me changing anything in that object. Am I missing something besides sleep? Cheers On Sunday,

Password Field Auto-Encryption?

2023-09-24 Thread bee...@gmail.com
For soem reason I have a field that's changing upon assigning it as a property value. I have no clue why. *DL.create_table? :pwtest do primary_key :id String :uname, size: 16 String :pw, size: 64 DateTime :cdate, default: Sequel::CURRENT_TIMESTAMPend* *class PWtes

Re: More hstore

2023-08-25 Thread bee...@gmail.com
using Ruby to sniff out the qualified records. But you've provided those right into the query. Good job. Cheers On Monday, August 21, 2023 at 2:44:34 PM UTC-4 Jeremy Evans wrote: > On Mon, Aug 21, 2023 at 11:02 AM bee...@gmail.com > wrote: > >> OK, so I'm now even

Re: More hstore

2023-08-21 Thread bee...@gmail.com
extensions/pg_hstore_rb.html It shows a .has_value? method, which is exactly what I'm looking for. It seems I have to grab that whole dataset and perform a proc looking for the value. On Thursday, August 17, 2023 at 10:28:25 AM UTC-4 Jeremy Evans wrote: > On Thu, Aug 17, 2023 at 3:11 AM bee..

More hstore

2023-08-17 Thread bee...@gmail.com
I'm wanting to find records whose stored hash has a value (eventually values). Searching for keys works, but values doesn't: *res = htable.where(Sequel.hstore(:hstore_col).has_key?(keychoice)).select_map(:id)* While there is a method *has_value?(keychoice)*, it throws a *NoMethodError* . *re

Re: hstore Errors

2023-08-06 Thread bee...@gmail.com
Ah I also didn't know you needed the gem *pg_hstore*. Works now. Cheers On Sunday, August 6, 2023 at 11:06:19 AM UTC-4 bee...@gmail.com wrote: > Oops forgot that. But a new require error: > > *cannot load such file -- sequel/extensions/hstore (LoadError)* > > On Saturda

Re: hstore Errors

2023-08-06 Thread bee...@gmail.com
Oops forgot that. But a new require error: *cannot load such file -- sequel/extensions/hstore (LoadError)* On Saturday, August 5, 2023 at 8:55:20 PM UTC-4 Jeremy Evans wrote: > On Sat, Aug 5, 2023 at 3:52 PM bee...@gmail.com wrote: > >> For some reason I can't s

Re: hstore Errors

2023-08-05 Thread bee...@gmail.com
Before it's asked, hstore is indeed installed: *# CREATE EXTENSION IF NOT EXISTS "hstore";NOTICE: extension "hstore" already exists, skipping* On Saturday, August 5, 2023 at 6:51:28 PM UTC-4 bee...@gmail.com wrote: > For some reason I can't seem to Hash.st

hstore Errors

2023-08-05 Thread bee...@gmail.com
For some reason I can't seem to Hash.store. *a = {:a => "orange",:b => "red",:c => "green"}trial = Sequel.hstore(a)ap trial* Throws error: *{:a => "orange",:b => "red",:c => "green"}/users/rich/app.rb:303:in `': undefined method `hstore' for Sequel:M

Re: Equivalent Fields

2022-11-17 Thread bee...@gmail.com
Thank you On Tuesday, November 15, 2022 at 3:17:39 PM UTC-5 Jeremy Evans wrote: > On Tue, Nov 15, 2022 at 9:36 AM bee...@gmail.com wrote: > >> I need to find records where two fields are the same (strings). I've >> tried a handful of things, but they call co

Equivalent Fields

2022-11-15 Thread bee...@gmail.com
I need to find records where two fields are the same (strings). I've tried a handful of things, but they call come back as 'WHERE false'. Here's the two that I thought would work: puts d.where(Sequel(:field1 == :field2)).to_a.size puts d.where(:field1 == :field2).to_a.size Using a single equa

Re: Field Value Length

2022-11-06 Thread bee...@gmail.com
Cheers On Saturday, November 5, 2022 at 1:44:58 PM UTC-4 Jeremy Evans wrote: > On Sat, Nov 5, 2022 at 5:52 AM bee...@gmail.com wrote: > >> How can I delete records whose field values are greater than a certain >> length? >> >> DL[:archives].where(:quotation.length

Field Value Length

2022-11-05 Thread bee...@gmail.com
How can I delete records whose field values are greater than a certain length? DL[:archives].where(:quotation.length > 300).delete I've also tried: DL[:archives].where(Sequel[:quotation.length] > 300).delete -- You received this message because you are subscribed to the Google Groups "seque

Re: create_table? for timestamp

2021-10-15 Thread bee...@gmail.com
riday, October 15, 2021 at 8:23:30 PM UTC-4 Jeremy Evans wrote: > On Fri, Oct 15, 2021 at 4:46 PM bee...@gmail.com wrote: > >> A couple of things. I'm looking for a way to create a timestamp field >> that has a default expression of *now().* >> >> Documentation s

create_table? for timestamp

2021-10-15 Thread bee...@gmail.com
A couple of things. I'm looking for a way to create a timestamp field that has a default expression of *now().* Documentation shows the following, whose first field is tripping: *DL.create_table(:bubbbles) do* * column :a1, :string#error below* * column :a2, String

Re: odd number of arguments for Hash

2021-08-29 Thread bee...@gmail.com
Thank you On Sunday, August 29, 2021 at 11:24:57 AM UTC-4 Jeremy Evans wrote: > On Sat, Aug 28, 2021 at 8:22 PM bee...@gmail.com wrote: > >> OK, understood. How do I insist on required parameters, named or >> otherwise? >> > > Probably easiest to check

Re: odd number of arguments for Hash

2021-08-28 Thread bee...@gmail.com
Sorry...half way through a Saturday evening. I will try with a single hash thrown, but how do I require such a structure, given I can't manipulate the initialize? On Saturday, August 28, 2021 at 11:22:12 PM UTC-4 bee...@gmail.com wrote: > OK, understood. How do I insist on

Re: odd number of arguments for Hash

2021-08-28 Thread bee...@gmail.com
OK, understood. How do I insist on required parameters, named or otherwise? On Saturday, August 28, 2021 at 9:41:51 PM UTC-4 Jeremy Evans wrote: > On Sat, Aug 28, 2021 at 2:26 PM bee...@gmail.com wrote: > >> Not sure why this is happening. I'm getting as an error. I'v

odd number of arguments for Hash

2021-08-28 Thread bee...@gmail.com
Not sure why this is happening. I'm getting as an error. I've tried using both directive and non-directive for @id in the initialize method, with same error. Seems the object is the same column profile. Any clue why this is happening? DL.create_table? :mobibase do primary_key :id D

Re: Mac M1 Supported?

2021-03-17 Thread bee...@gmail.com
install- > > Geff > > > On Mar 10, 2021, at 3:41 AM, bee...@gmail.com wrote: > > No clue what you mean by *pg developer stuff*. > > Investigated further to find an issue with *libpq-fe.h* header file. I'm > on a new box and haven't installed *postgres*

Re: Mac M1 Supported?

2021-03-10 Thread bee...@gmail.com
t; No pg_config... trying anyway. If building fails, please try again with > --with-pg-config=/path/to/pg_config > checking for libpq-fe.h... no > Can't find the 'libpq-fe.h header > > On Mar 9, 2021, at 1:38 PM, bee...@gmail.com wrote: > > I'm on a brand new Min

Re: Mac M1 Supported?

2021-03-09 Thread bee...@gmail.com
and some v8 gems for therubyracer. > > On Tuesday, March 9, 2021 at 12:21:55 PM UTC-5 bee...@gmail.com wrote: > >> Hi folks. Just wondering if M1 silicon is supported yet. I haven't >> tried as there are issues with the PG gem, either path or the gem itself. &g

Mac M1 Supported?

2021-03-09 Thread bee...@gmail.com
Hi folks. Just wondering if M1 silicon is supported yet. I haven't tried as there are issues with the PG gem, either path or the gem itself. I thought I would investigate any potential issues with M1. Cheers -- You received this message because you are subscribed to the Google Groups "se

Re: Exclusions

2021-01-05 Thread bee...@gmail.com
t;, extract(hour FROM age("cdate", '2021-01-05 18:50:44.566644-0500')) AS "age", "vessel" FROM "yachts" WHERE (("cdate" > '2021-01-04 18:50:44.566494-0500') AND (("lat" != 0.0) OR ("lon" != 0.0))) Perfe

Re: Exclusions

2021-01-05 Thread bee...@gmail.com
s: > > https://github.com/jeremyevans/sequel/blob/master/doc/dataset_filtering.rdoc#negating-conditions- > > Em ter., 5 de jan. de 2021 às 11:34, bee...@gmail.com > escreveu: > >> I can't seem to get an exclusion working: >> >> DL[:yachts].exclude{(lat =

Select age from timestamp field

2021-01-05 Thread bee...@gmail.com
Having trouble with selecting the age of records from their creation date field *cdate*. puts DL[:yachts]. select(Sequel.function(:age, :cdate, Time.now), cast(:interval)). extract(:hour).to_a Tried this without the cast to :interval and it trips over the coercion to array: puts DL

Exclusions

2021-01-05 Thread bee...@gmail.com
I can't seem to get an exclusion working: DL[:yachts].exclude{(lat = 0.0) & (lon = 0.0)} Disregarding that [0.0,0.0] is possible for yacht, I'd like to exclude these floats from those associated fields, qualified with both filters. I'm assuming this isn't a cast issue as 0.0 would be seen as

Field Value Length

2020-09-21 Thread bee...@gmail.com
I'm looking for a way to grab records where a field is less than 4 characters. *Sequel(len(:postal)) < 4* This trips up, and I can't find any references to length in the docs. Is there a solution? Cheers -- You received this message because you are subscribed to the Google Groups "sequel

Quick Decrement

2020-08-13 Thread bee...@gmail.com
Is there a quick way to decrement a field without having a sub-query? .update(field_count: :field_count - 1 I'm not sure if this is implicit or I need a sub-query. Cheers -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this

Re: Update on Single Record

2020-08-12 Thread bee...@gmail.com
-4 Jeremy Evans wrote: > On Wednesday, August 12, 2020 at 1:15:56 PM UTC-7, bee...@gmail.com wrote: >> >> Having some trouble with updating a single field. *target* is a >> generated integer, as to which record to update, and *dings* is my >> current full dataset, a

Update on Single Record

2020-08-12 Thread bee...@gmail.com
Having some trouble with updating a single field. *target* is a generated integer, as to which record to update, and *dings* is my current full dataset, and *newvalue *is a new string. dings = DBHR[:dingbats] newvalue = Dev.genp ids = dings.select(:id).map(:id) target = ids.sample dings.update(

params[:something] as Hash Value

2020-08-10 Thread bee...@gmail.com
I was running into a problem with a parameter inside a statement. I took it out and captured it in a variable and it worked. Can I not use params directly? res = DR[:tablename].where{{thisfield: params[:thisfieldvalue], status: 'active'}}.to_a Cheers -- You received this message because you

Re: .order(random) or .random

2020-08-05 Thread bee...@gmail.com
I've taken the randomization out of the query, and into an array method. On Wednesday, August 5, 2020 at 9:36:33 AM UTC-4 Jeremy Evans wrote: > On Wednesday, August 5, 2020 at 3:18:28 AM UTC-7, bee...@gmail.com wrote: >> >> Is there a way of randomizing datasets? I tried

.order(random) or .random

2020-08-05 Thread bee...@gmail.com
Is there a way of randomizing datasets? I tried both without success. Also can't find 'random' in the docs. Cheers -- 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 ema

Re: .where(tablename[:status] => 'active')

2020-08-04 Thread bee...@gmail.com
...and is there any overhead on splitting them up into compound ".where..." clauses? On Tuesday, August 4, 2020 at 1:07:31 PM UTC-4 bee...@gmail.com wrote: > Even larger, this follows the block and internal qualifiers, but has an > undefined method '&': &

Re: .where(tablename[:status] => 'active')

2020-08-04 Thread bee...@gmail.com
First qualifier there is "pcid IN " On Tuesday, August 4, 2020 at 12:52:07 PM UTC-4 Jeremy Evans wrote: > On Tuesday, August 4, 2020 at 9:49:15 AM UTC-7, bee...@gmail.com wrote: >> >> How do you combine multiple items in a virtual row block? >> >> where{{

Re: .where(tablename[:status] => 'active')

2020-08-04 Thread bee...@gmail.com
How do you combine multiple items in a virtual row block? where{{listing[:product_name].ilike(submitted.to_s), listing[:status] => 'active'}}. On Tuesday, August 4, 2020 at 12:45:52 PM UTC-4 bee...@gmail.com wrote: > Ah was combining the two concepts. Thank you. > >

Re: .where(tablename[:status] => 'active')

2020-08-04 Thread bee...@gmail.com
Ah was combining the two concepts. Thank you. On Tuesday, August 4, 2020 at 12:44:36 PM UTC-4 bee...@gmail.com wrote: > r = a.where{{id > 20, listins[:status]=>'active'}} > > error: unexpected '}' > > > On Tuesday, August 4, 2020 at 11:04:22 AM

Re: .where(tablename[:status] => 'active')

2020-08-04 Thread bee...@gmail.com
r = a.where{{id > 20, listins[:status]=>'active'}} error: unexpected '}' On Tuesday, August 4, 2020 at 11:04:22 AM UTC-4 bee...@gmail.com wrote: > Hi there. I'm confused about the syntax of filtering records whose status > is 'active'. I can

.where(tablename[:status] => 'active')

2020-08-04 Thread bee...@gmail.com
Hi there. I'm confused about the syntax of filtering records whose status is 'active'. I can't format it the way I like (fieldname: 'active') because in this join, two tables have the 'status' field. So I have to include the tablename, then the fieldname, as `tablename[:fieldname]`. Even u