Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/w/e/web2cms-HEAD/web2py/gluon/tests/test_dal.py   web2cms(Download)
    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('name'), Field('a','reference t'))
        db.commit()
        x = db.t.insert(name='max')
        assert y.a == 1
        assert y.a.a.a.a.a.a.name == 'max'
        z=db.t.insert(name='xxx', a = y)
        assert z.a == y.id
        db.t.drop()
    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        db.commit()
        db.t.insert(a="test")
    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        db.commit()
        db.t.insert(a="test")

src/w/e/web2py-python3-HEAD/gluon/tests/test_dal.py   web2py-python3(Download)
    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('name'), Field('a','reference t'))
        db.commit()
        x = db.t.insert(name='max')
        assert y.a == 1
        assert y.a.a.a.a.a.a.name == 'max'
        z=db.t.insert(name='xxx', a = y)
        assert z.a == y.id
        db.t.drop()
    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        db.commit()
        db.t.insert(a="test")
    def testRun(self):
        db = DAL('sqlite:memory:')
        db.define_table('t', Field('a'))
        db.commit()
        db.t.insert(a="test")