示例#1
0
    def connect(self, host=None):
        if host is None:
            self.pool = pybase.connect([self.config.host])
            print "connecting to %s" %(self.config.host)
        else:
            self.pool = pybase.connect( [host])
            print "connecting to %s" %(host)

        for name in schema:
            setattr(self, name.upper(), pybase.HTable(self.pool, name, schema[name], createIfNotExist=True, overwrite=False))
示例#2
0
    def connect(self, host=None):
        if host is None:
            self.pool = pybase.connect([self.config.host])
            print "connecting to %s" % (self.config.host)
        else:
            self.pool = pybase.connect([host])
            print "connecting to %s" % (host)

        for name in schema:
            setattr(
                self, name.upper(),
                pybase.HTable(self.pool,
                              name,
                              schema[name],
                              createIfNotExist=True,
                              overwrite=False))
示例#3
0
 def test(self):
     sys = pybase.connect([self.config.host])
     print sys.getTableNames()
示例#4
0
 def test(self):
     sys = pybase.connect([self.config.host])
     print sys.getTableNames()