From e8abcf8d8583c917ba85790d21f775778f7d716e Mon Sep 17 00:00:00 2001 From: Alex Chapman Date: Tue, 1 Apr 2008 13:41:03 +1100 Subject: [PATCH] semantic-db: change 2apply to bi@ --- extra/semantic-db/semantic-db-tests.factor | 4 ++-- extra/semantic-db/semantic-db.factor | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/semantic-db/semantic-db-tests.factor b/extra/semantic-db/semantic-db-tests.factor index ac620de4d9..8fec6d5cbb 100644 --- a/extra/semantic-db/semantic-db-tests.factor +++ b/extra/semantic-db/semantic-db-tests.factor @@ -54,10 +54,10 @@ test-db [ "charlie" create-node "charlie" set "gertrude" create-node "gertrude" set [ ] [ "bob" get "adam" get has-parent ] unit-test - { { "bob" "eve" } { "fran" "eve" } { "gertrude" "bob" } { "fran" "bob" } { "charlie" "fran" } } [ first2 [ get ] 2apply has-parent ] each + { { "bob" "eve" } { "fran" "eve" } { "gertrude" "bob" } { "fran" "bob" } { "charlie" "fran" } } [ first2 [ get ] bi@ has-parent ] each [ { "bob" "fran" } ] [ "eve" get has-parent-relation children [ node-content ] map ] unit-test [ { "adam" "eve" } ] [ "bob" get has-parent-relation parents [ node-content ] map ] unit-test - [ "fran" { "charlie" } ] [ "fran" get has-parent-relation get-node-hierarchy dup node>> node-content swap children>> [ node>> node-content ] map ] unit-test + [ "fran" { "charlie" } ] [ "fran" get has-parent-relation get-node-tree-s dup node>> node-content swap children>> [ node>> node-content ] map ] unit-test [ { "adam" "eve" } ] [ "charlie" get has-parent-relation get-root-nodes [ node-content ] map natural-sort >array ] unit-test [ { } ] [ "charlie" get dup "fran" get !has-parent has-parent-relation parents [ node-content ] map ] unit-test [ { "adam" "eve" } ] [ has-parent-relation ultimate-objects node-results [ node-content ] map ] unit-test diff --git a/extra/semantic-db/semantic-db.factor b/extra/semantic-db/semantic-db.factor index 2500441b11..b33d795c9c 100755 --- a/extra/semantic-db/semantic-db.factor +++ b/extra/semantic-db/semantic-db.factor @@ -110,7 +110,7 @@ arc "arc" [ node-result ] map ; : subjects-with-cor ( content object relation -- sql-results ) - [ id>> ] 2apply + [ id>> ] bi@ [ ":relation" INTEGER param , ":object" INTEGER param , @@ -119,7 +119,7 @@ arc "arc" "select n.id, n.content from node n, arc a where n.content = :content and n.id = a.subject and a.relation = :relation and a.object = :object" results ; : objects-with-csr ( content subject relation -- sql-results ) - [ id>> ] 2apply + [ id>> ] bi@ [ ":relation" INTEGER param , ":subject" INTEGER param ,