Making Custom Functions with Squeryl-Record

70 views
Skip to first unread message

Bruna

unread,
Jun 8, 2011, 11:08:34 AM6/8/11
to Lift
Hi,

I'm using squeryl-record. Is there any way to build my sql using DB
pre-defined functions?

For example

class Ta extends Record[Ta] with KeyedRecord[Int] {
override def meta = Ta

override val idField = new IntField(this)
val time = new DateTimeField(this)
}

object Sc extends Schema{
val tab = table[Ta]

def func = from(tab)(t =>
where(to_char(t.time,"mi") = "00")
select(h))
}

thanks

David Whittaker

unread,
Jun 9, 2011, 10:17:42 AM6/9/11
to lif...@googlegroups.com
I think that Max has been helping you out with this on the Squeryl list.  Are you set?


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.


David Whittaker

unread,
Jun 15, 2011, 4:04:58 PM6/15/11
to lif...@googlegroups.com
Bruna,

Max had asked me to take a second look at this and there does appear to be a Squeryl/Record bug that specifically affects DateTimeField.  Would you mind creating a Lift ticket referencing this thread and assigning it to me?  I'm working on a fix which should be ready soon.

On Wed, Jun 8, 2011 at 11:08 AM, Bruna <brunac...@gmail.com> wrote:

David Whittaker

unread,
Jun 17, 2011, 10:45:46 AM6/17/11
to lif...@googlegroups.com

David Whittaker

unread,
Jun 17, 2011, 4:44:55 PM6/17/11
to lif...@googlegroups.com
Fix for this is in master.  Please check out the latest snapshot if you can and let me know if your issue is resolved.

Thanks,
Dave
Reply all
Reply to author
Forward
0 new messages