| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Mizter Egoist 07.11.2016 15:40 / 07.11.2016 15:42
Продолжаю изучать и дорабатывать, в итоге, код не менялся:@update[node;options]
$options[^hash::create[$options]]
$eID(^options.eID.int(0))
$anc(^options.anc.int(0))
^self._transaction{
$result(^self._updatePage[$node;$eID][$options])
^if($eID ne 1 && $eID){
^self.move[$eID][$anc]
}
}
@move[dsc;pID]
$dsc(^dsc.int(0))
$pID(^pID.int(0))
#115 строка
$descendants[^self.descendants($dsc)[$.with-self(true)]]
^if($descendants){
$ancestor[^self.ancestors($dsc)[$.with-self(false)]]
$parent_ancestor[^self.ancestors($pID)[$.with-self(true)]]
^self._transaction{
^self._unlink[$descendants;$ancestor]
^self._link[$descendants;$parent_ancestor]
}
}
@descendants[nodes;options]
# Извлекает потомков.
$options[^hash::create[$options]]
$result[^table::sql{
SELECT t.anc, t.dsc, t.lvl
^self._parentField($with_parent)
FROM path AS t
^self._parentTable($with_parent)
WHERE 1
AND t.anc IN (^self._list[$nodes;dsc])
^if(!^options.[with-self].bool(true)){AND t.lvl > 0}
}[^self._sqlOptions[$options]]]В итоге, возникает ошибка:tree.p(115:20): 'descendants' is 'table', not a method or junction, can not call it [parser.runtime]