Allow schema files that are missing checksums on the !!SCHEMAMATIC line.
[versaplex.git] / wvdotnet / test.py
bloba64dded0b65e3667c9bead4689b912d1248e4d45
1 import sys
2 import clr
4 sys.path.Add('/home/apenwarr/src/vx-lin/wvdotnet')
5 clr.AddReference('wv.dll')
6 from Wv import *
8 class TestyRow:
9 r = None
11 def __init__(self, dbirow):
12 self.r = dbirow
14 def __repr__(self):
15 return self.r.data.__repr__()
17 def __getitem__(self, x):
18 return self.r[x].inner
20 def __getattr__(self, x):
21 return self.__getitem__(x)
23 class Testy:
24 dbi = None
26 def __init__(self, moniker):
27 self.dbi = WvDbi.create(moniker)
29 def select(self, q, *args):
30 return [TestyRow(r) for r in self.dbi.select(q, *args)]
32 d = Testy('mssql://sa:scs@pwc-averyp/avery-ams')
34 for r in d.select('select top 5 * from Names where NameType=@col0', 'COUNTRY'):
35 print r.NameIdCode, r.LastName
36 print list(r.r)