/[webpac]/openisis/current/tcl/test/test1.087.tcl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /openisis/current/tcl/test/test1.087.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (show annotations)
Mon Mar 8 17:43:12 2004 UTC (20 years, 1 month ago) by dpavlin
File MIME type: application/x-tcl
File size: 1859 byte(s)
initial import of openisis 0.9.0 vendor drop

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: test1.087.tcl,v 1.1 2003/03/06 16:01:47 mawag Exp $
28 # test script for tcl-binding of openisis
29
30 # openIsisLog 9 /opt/openisis/tcl/test/test1.log
31 # openIsisLog v
32
33 set ses0 [openIsisInit]
34 puts $ses0
35
36 set db1 [openIsisOpen /opt/openisis/db/cds/cds]
37
38 puts $db1
39
40 # $db1 check
41
42 set maxrow [$db1 maxrowid -s $ses0]
43 # set maxrow [$db1 maxrowid]
44 puts $maxrow
45
46 if 0 {
47 set i 0
48 while {$maxrow > $i} {
49 set rec [$db1 r $i -s $ses0]
50 puts "$i -> $rec"
51 incr i
52 }
53 }
54
55 # set rs1 [$db1 query Micropolitan]
56 set rs1 [$db1 query Africa]
57 set rs1s [$rs1 size]
58 puts "$rs1 total = $rs1s"
59 set i 0
60 while {$rs1s > $i} {
61 set rid [$rs1 next]
62 set rec [$rs1 get $i]
63 puts "found $i -> $rid -> $rec"
64 incr i
65 }
66
67 $rs1 cl
68 $db1 cl
69

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26