[Ur] Sql.easy_insertOrUpdate
Saulo Araujo
saulo2 at gmail.com
Wed Sep 28 18:54:59 EDT 2016
Hi,
Apparently, the way to go is to make the arguments explicit. Therefore,
rather than writing:
Sql.easy_insertOrUpdate [[cellTableGroupForeignKeyColumnName = _,
cellTableRowForeignKeyColumnName = _,
cellTableDateColumnName = _]]
cellTable
({cellTableGroupForeignKeyColumnName = groupId,
cellTableRowForeignKeyColumnName = rowId,
cellTableDateColumnName = date} ++ contents)
one has to write:
@Sql.easy_insertOrUpdate
[[cellTableGroupForeignKeyColumnName = _, cellTableRowForeignKeyColumnName
= _, cellTableDateColumnName = _]]
!
_
cellTableOtherColumnsInjectable
_
cellTableOtherColumnsFolder
cellTable
({cellTableGroupForeignKeyColumnName = groupId,
cellTableRowForeignKeyColumnName = rowId, cellTableDateColumnName = date}
++ contents)
Sincerely,
Saulo
On Wed, Sep 28, 2016 at 5:47 PM, Saulo Araujo <saulo2 at gmail.com> wrote:
> Hi,
>
> I am trying to use the function Sql.easy_insertOrUpdate in the code
> https://github.com/saulo2/timesheet-upo/blob/master/timeSheet.ur but I am
> getting the following compiler errors:
>
> /home/saulo/Programming/projects/timesheet-upo/timeSheet.ur:103:1: (to
> 105:35) Can't resolve type class instance
> Class constraint: $(map sql_injectable S.cellTableOtherColumns)
> /home/saulo/Programming/projects/timesheet-upo/timeSheet.ur:103:1: (to
> 105:35) Can't resolve type class instance
> Class constraint: Top.folder[[Type]] S.cellTableOtherColumns
>
> I faced similar errors before, and I got rid of them by declaring the type
> class instances in the SCHEMA signature. However, doing the same did not
> work for
>
> $(map sql_injectable S.cellTableOtherColumns)
>
> and
>
> folder cellTableOtherColumns.
>
> Does anyone know why?
>
> Sincerely,
> Saulo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20160928/ca7bef39/attachment.html>
More information about the Ur
mailing list