Just replace '|' with new line, so the input looks like this:

+:1:r
1:1
.

for the case. The first '1' indicates its reference count, and will be ignored 
for input 
tables. The man page has more description on how the reference count is used.

For query in this example, use:

?:1:r
1:
.

This will list all tuples for the table 'r'.

-- Yusheng
________________________________________
From: Hui Kang <ka...@us.ibm.com>
Sent: Saturday, June 18, 2016 2:06 AM
To: Yusheng Wang
Cc: dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH] OVN: initial patch of datalog engine

Hi, Yusheng,
When running the datalog test_interactive program, I have some difficulty in
generating the output of the incremental change. Could you help to check at 
which
step I did something wrong?

-----------------------------------------------------------------------------
Step 1: Create a rule of joining table r(a) with an empty table as in the
example

root@test:~/ovs/tests# ./ovstest test-datalog run
Input rules, e.g. R(a):r(a).
use EOF as end

R(a):r(a).
EOF
Input changes, e.g. +:1:tbl_name|1:f0:f1|.
use +, -, ? for add, remove, or query.
could input multiple tables. the number in table name
line indicates number of tuples to follow.
'|' stands for new line. use '.' to exit
for query, field value could be empty.


Step 2: I tried to insert one tuple to table r in order to see the change
datalog will make to table R. Since table r has one field name as a,
I input the following line and I got this error message


+:1:r|1|.
Error in format
-------------------------------------------------------------------------------

Any idea? Thanks.

- Hui
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to