1 |
#!/opt/openisis/tcl/tclbuild/tclsh |
2 |
# |
3 |
# openisis - an open implementation of the ISIS database |
4 |
# Version 0.8.x (microversion see file Version) |
5 |
# Copyright (C) 2003 by Erik Grziwotz, erik@openisis.org |
6 |
# |
7 |
# This library is free software; you can redistribute it and/or |
8 |
# modify it under the terms of the GNU Lesser General Public |
9 |
# License as published by the Free Software Foundation; either |
10 |
# version 2.1 of the License, or (at your option) any later version. |
11 |
# |
12 |
# This library is distributed in the hope that it will be useful, |
13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 |
# Lesser General Public License for more details. |
16 |
# |
17 |
# You should have received a copy of the GNU Lesser General Public |
18 |
# License along with this library; if not, write to the Free Software |
19 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
# |
21 |
# This software is dedicated to the memory of Eckart Dietrich. |
22 |
# |
23 |
# This software is inspired by (but contains no code of) the iAPI |
24 |
# Copyright (C) 2000 by Robert Janusz, rj@jezuici.krakow.pl. |
25 |
# See iAPI.txt for what it contains. |
26 |
# |
27 |
# $Id: test5.087.tcl,v 1.1 2003/03/06 16:01:47 mawag Exp $ |
28 |
# test script for tcl-binding of openisis |
29 |
|
30 |
# openIsisLog v |
31 |
|
32 |
set ses0 [openIsisInit] |
33 |
|
34 |
set db [openIsisOpen /opt/openisis/db/cds/cds] |
35 |
|
36 |
set res [$db query africa -session $ses0] |
37 |
puts ---------------------------------------------------------------- |
38 |
puts "africa 0 -> [$res list]" |
39 |
$res close |
40 |
|
41 |
set res [$db query africa -mode 1 -session $ses0] |
42 |
puts ---------------------------------------------------------------- |
43 |
puts "africa 1 -> [$res list]" |
44 |
$res close |
45 |
|
46 |
set res [$db query africa$ -mode 2 -session $ses0] |
47 |
puts ---------------------------------------------------------------- |
48 |
puts "africa$ 2 -> [$res list]" |
49 |
$res close |
50 |
|
51 |
# -mode 64 not implemented yet |
52 |
|
53 |
set res [$db query africa -mode 128 -session $ses0] |
54 |
puts ---------------------------------------------------------------- |
55 |
puts "africa 128 -> [$res list]" |
56 |
$res close |
57 |
|
58 |
# -mode 129 no effect |
59 |
|
60 |
set res [$db query universities -mode 0 -session $ses0] |
61 |
puts ---------------------------------------------------------------- |
62 |
puts "universities 0 -> [$res list]" |
63 |
$res close |
64 |
|
65 |
set res [$db query {universities + africa} -mode 128 -session $ses0] |
66 |
puts ---------------------------------------------------------------- |
67 |
puts "universities+africa 128 -> [$res list]" |
68 |
$res close |
69 |
|
70 |
set res [$db query {universities ^ africa} -mode 128 -session $ses0] |
71 |
puts ---------------------------------------------------------------- |
72 |
puts "universities^africa 128 -> [$res list]" |
73 |
$res close |
74 |
|
75 |
set res [$db query {universities africa} -mode 128 -session $ses0] |
76 |
puts ---------------------------------------------------------------- |
77 |
puts "universities africa 128 -> [$res list]" |
78 |
$res close |
79 |
|
80 |
$db close |
81 |
|