foreach [message #1038837] |
Thu, 11 April 2013 12:03 |
samar sousou Messages: 63 Registered: March 2013 |
Member |
|
|
hi,
why the distinct and the foreach don't work!! there is a plug in not installed!!
my rule is :
rule EnumColumn {
from
i : XML!Element (
if i.name = 'TableInfoTable'
then
i.getFirstElementByName('Type').getTextValue().startsWith('enum')
else
false
endif
)
using {
items : Sequence(String) =
i.getFirstElementByName('Type').getTextValue().getItemList();
}
to
o : MySQL!EnumColumn (
name <- i.getFirstElementByName('Field').getTextValue(),
type <- 'enum',
isPrimaryKey <-
i.getFirstElementByName('Key').getTextValue() = 'PRI',
null <- i.getFirstElementByName('Null').getTextValue() = 'YES',
defaultValue <- i.getFirstElementByName('Default').getTextValue(),
comment <- i.getFirstElementByName('Comment').getTextValue(),
table <- i.parent,
enumSet <- e1
),
e1 : MySQL!EnumSet (
enumItems <- e2
),
e2 : distinct MySQL!EnumItem foreach(i in items) (
name <- i,
enumSet <- e1
)
}
the error was:
distinct-foreach target pattern elements are deprecated, use lazy rules instead
but how can I do the lazy rule!!
I tried but there is a problem all the time :'(
I need your help.
thank you.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03422 seconds