Synthetic fields

2021-10-13 Thread David Espada
Hi. I need to define a synthtic field for a Sequel::Model source dataset. I'd like getting a sum field with any Model query. How can it be done? Thank you very much. -- David -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe

Re: Synthetic fields

2021-10-13 Thread Jeremy Evans
On Wed, Oct 13, 2021 at 1:49 AM David Espada wrote: > Hi. > > I need to define a synthtic field for a Sequel::Model source dataset. I'd > like getting a sum field with any Model query. How can it be done? > It sounds like you want to add a SELECTed expression to the model's dataset: class

Re: dataset columns method performance

2021-10-13 Thread Jeremy Evans
On Wed, Oct 13, 2021 at 2:03 PM Josh Crank wrote: > Our DBA mentioned that he uses LIMIT 0 himself. > But from what I gather in regards to the ORDER BY RANDOM(), its because > when you don't have column that has small gaps between values (such as our > pk UID's), then attaching an order by with

Re: dataset columns method performance

2021-10-13 Thread Josh Crank
Our DBA mentioned that he uses LIMIT 0 himself. But from what I gather in regards to the ORDER BY RANDOM(), its because when you don't have column that has small gaps between values (such as our pk UID's), then attaching an order by with a random value can actually help the query pull a result.