亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? selectable.py

?? SQLAlchemy. 經典的Python ORM框架。學習必看。
?? PY
?? 第 1 頁 / 共 2 頁
字號:
"""tests that various From objects properly export their columns, as well asuseable primary keys and foreign keys.  Full relational algebra depends onevery selectable unit behaving nicely with others.."""import testenv; testenv.configure_for_tests()from sqlalchemy import *from testlib import *from sqlalchemy.sql import util as sql_utilmetadata = MetaData()table = Table('table1', metadata,    Column('col1', Integer, primary_key=True),    Column('col2', String(20)),    Column('col3', Integer),    Column('colx', Integer),)table2 = Table('table2', metadata,    Column('col1', Integer, primary_key=True),    Column('col2', Integer, ForeignKey('table1.col1')),    Column('col3', String(20)),    Column('coly', Integer),)class SelectableTest(TestBase, AssertsExecutionResults):    def testdistance(self):        # same column three times        s = select([table.c.col1.label('c2'), table.c.col1, table.c.col1.label('c1')])        # didnt do this yet...col.label().make_proxy() has same "distance" as col.make_proxy() so far        #assert s.corresponding_column(table.c.col1) is s.c.col1        assert s.corresponding_column(s.c.col1) is s.c.col1        assert s.corresponding_column(s.c.c1) is s.c.c1    def testjoinagainstself(self):        jj = select([table.c.col1.label('bar_col1')])        jjj = join(table, jj, table.c.col1==jj.c.bar_col1)        # test column directly agaisnt itself        assert jjj.corresponding_column(jjj.c.table1_col1) is jjj.c.table1_col1        assert jjj.corresponding_column(jj.c.bar_col1) is jjj.c.bar_col1        # test alias of the join, targets the column with the least        # "distance" between the requested column and the returned column        # (i.e. there is less indirection between j2.c.table1_col1 and table.c.col1, than        # there is from j2.c.bar_col1 to table.c.col1)        j2 = jjj.alias('foo')        assert j2.corresponding_column(table.c.col1) is j2.c.table1_col1    def testselectontable(self):        sel = select([table, table2], use_labels=True)        assert sel.corresponding_column(table.c.col1) is sel.c.table1_col1        assert sel.corresponding_column(table.c.col1, require_embedded=True) is sel.c.table1_col1        assert table.corresponding_column(sel.c.table1_col1) is table.c.col1        assert table.corresponding_column(sel.c.table1_col1, require_embedded=True) is None    def testjoinagainstjoin(self):        j  = outerjoin(table, table2, table.c.col1==table2.c.col2)        jj = select([ table.c.col1.label('bar_col1')],from_obj=[j]).alias('foo')        jjj = join(table, jj, table.c.col1==jj.c.bar_col1)        assert jjj.corresponding_column(jjj.c.table1_col1) is jjj.c.table1_col1        j2 = jjj.alias('foo')        print j2.corresponding_column(jjj.c.table1_col1)        assert j2.corresponding_column(jjj.c.table1_col1) is j2.c.table1_col1        assert jjj.corresponding_column(jj.c.bar_col1) is jj.c.bar_col1    def testtablealias(self):        a = table.alias('a')        j = join(a, table2)        criterion = a.c.col1 == table2.c.col2        self.assert_(criterion.compare(j.onclause))    def testunion(self):        # tests that we can correspond a column in a Select statement with a certain Table, against        # a column in a Union where one of its underlying Selects matches to that same Table        u = select([table.c.col1, table.c.col2, table.c.col3, table.c.colx, null().label('coly')]).union(                select([table2.c.col1, table2.c.col2, table2.c.col3, null().label('colx'), table2.c.coly])            )        s1 = table.select(use_labels=True)        s2 = table2.select(use_labels=True)        print ["%d %s" % (id(c),c.key) for c in u.c]        c = u.corresponding_column(s1.c.table1_col2)        print "%d %s" % (id(c), c.key)        print id(u.corresponding_column(s1.c.table1_col2).table)        print id(u.c.col2.table)        assert u.corresponding_column(s1.c.table1_col2) is u.c.col2        assert u.corresponding_column(s2.c.table2_col2) is u.c.col2    def test_singular_union(self):        u = union(select([table.c.col1, table.c.col2, table.c.col3]), select([table.c.col1, table.c.col2, table.c.col3]))        assert u.oid_column is not None        u = union(select([table.c.col1, table.c.col2, table.c.col3]))        assert u.oid_column        assert u.c.col1        assert u.c.col2        assert u.c.col3            def testaliasunion(self):        # same as testunion, except its an alias of the union        u = select([table.c.col1, table.c.col2, table.c.col3, table.c.colx, null().label('coly')]).union(                select([table2.c.col1, table2.c.col2, table2.c.col3, null().label('colx'), table2.c.coly])            ).alias('analias')        s1 = table.select(use_labels=True)        s2 = table2.select(use_labels=True)        assert u.corresponding_column(s1.c.table1_col2) is u.c.col2        assert u.corresponding_column(s2.c.table2_col2) is u.c.col2        assert u.corresponding_column(s2.c.table2_coly) is u.c.coly        assert s2.corresponding_column(u.c.coly) is s2.c.table2_coly    def testselectunion(self):        # like testaliasunion, but off a Select off the union.        u = select([table.c.col1, table.c.col2, table.c.col3, table.c.colx, null().label('coly')]).union(                select([table2.c.col1, table2.c.col2, table2.c.col3, null().label('colx'), table2.c.coly])            ).alias('analias')        s = select([u])        s1 = table.select(use_labels=True)        s2 = table2.select(use_labels=True)        assert s.corresponding_column(s1.c.table1_col2) is s.c.col2        assert s.corresponding_column(s2.c.table2_col2) is s.c.col2    def testunionagainstjoin(self):        # same as testunion, except its an alias of the union        u = select([table.c.col1, table.c.col2, table.c.col3, table.c.colx, null().label('coly')]).union(                select([table2.c.col1, table2.c.col2, table2.c.col3, null().label('colx'), table2.c.coly])            ).alias('analias')        j1 = table.join(table2)        assert u.corresponding_column(j1.c.table1_colx) is u.c.colx        assert j1.corresponding_column(u.c.colx) is j1.c.table1_colx    def testjoin(self):        a = join(table, table2)        print str(a.select(use_labels=True))        b = table2.alias('b')        j = join(a, b)        print str(j)        criterion = a.c.table1_col1 == b.c.col2        self.assert_(criterion.compare(j.onclause))    def testselectalias(self):        a = table.select().alias('a')        print str(a.select())        j = join(a, table2)        criterion = a.c.col1 == table2.c.col2        print criterion        print j.onclause        self.assert_(criterion.compare(j.onclause))    def testselectlabels(self):        a = table.select(use_labels=True)        print str(a.select())        j = join(a, table2)        criterion = a.c.table1_col1 == table2.c.col2        print        print str(j)        self.assert_(criterion.compare(j.onclause))    def testcolumnlabels(self):        a = select([table.c.col1.label('acol1'), table.c.col2.label('acol2'), table.c.col3.label('acol3')])        print str(a)        print [c for c in a.columns]        print str(a.select())        j = join(a, table2)        criterion = a.c.acol1 == table2.c.col2        print str(j)        self.assert_(criterion.compare(j.onclause))    def testselectaliaslabels(self):        a = table2.select(use_labels=True).alias('a')        print str(a.select())        j = join(a, table)        criterion =  table.c.col1 == a.c.table2_col2        print str(criterion)        print str(j.onclause)        self.assert_(criterion.compare(j.onclause))    def testtablejoinedtoselectoftable(self):        metadata = MetaData()        a = Table('a', metadata,            Column('id', Integer, primary_key=True))        b = Table('b', metadata,            Column('id', Integer, primary_key=True),            Column('aid', Integer, ForeignKey('a.id')),            )        j1 = a.outerjoin(b)        j2 = select([a.c.id.label('aid')]).alias('bar')        j3 = a.join(j2, j2.c.aid==a.c.id)        j4 = select([j3]).alias('foo')        print j4        print j4.corresponding_column(j2.c.aid)        print j4.c.aid        assert j4.corresponding_column(j2.c.aid) is j4.c.aid        assert j4.corresponding_column(a.c.id) is j4.c.id    @testing.emits_warning('.*replaced by another column with the same key')    def test_oid(self):        # the oid column of a selectable currently proxies all        # oid columns found within.        s = table.select()        s2 = table2.select()        s3 = select([s, s2])        assert s3.corresponding_column(table.oid_column) is s3.oid_column        assert s3.corresponding_column(table2.oid_column) is s3.oid_column        assert s3.corresponding_column(s.oid_column) is s3.oid_column        assert s3.corresponding_column(s2.oid_column) is s3.oid_column        u = s.union(s2)        assert u.corresponding_column(table.oid_column) is u.oid_column        assert u.corresponding_column(table2.oid_column) is u.oid_column        assert u.corresponding_column(s.oid_column) is u.oid_column        assert u.corresponding_column(s2.oid_column) is u.oid_column    class PrimaryKeyTest(TestBase, AssertsExecutionResults):    def test_join_pk_collapse_implicit(self):        """test that redundant columns in a join get 'collapsed' into a minimal primary key,        which is the root column along a chain of foreign key relationships."""        meta = MetaData()

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产盗摄精品一区二区三区在线 | 成人av在线资源网| 亚洲综合图片区| 日本一区二区视频在线观看| 欧美日韩国产在线播放网站| 成人精品一区二区三区四区| 久久国产精品色| 亚洲福利一区二区| 成人欧美一区二区三区白人| 26uuu亚洲婷婷狠狠天堂| 欧美视频在线播放| 91亚洲精品久久久蜜桃网站| 国产精品一区二区黑丝| 轻轻草成人在线| 亚洲大片一区二区三区| 国产精品久99| 欧美国产激情一区二区三区蜜月| 欧美不卡123| 91精品国产一区二区| 色视频欧美一区二区三区| 国产91色综合久久免费分享| 麻豆专区一区二区三区四区五区| 一区二区三区国产豹纹内裤在线| 国产人伦精品一区二区| 精品国内片67194| 日韩一区二区视频| 91精品国产综合久久久久 | 久久亚洲一级片| 正在播放亚洲一区| 欧美日韩国产精选| 欧美性做爰猛烈叫床潮| 91久久精品国产91性色tv| 91麻豆免费观看| 91视频你懂的| 色94色欧美sute亚洲线路二| 91色婷婷久久久久合中文| 成人激情动漫在线观看| 成人免费视频app| 成人三级伦理片| 成人高清在线视频| 91视频你懂的| 欧美在线观看18| 欧美精品丝袜中出| 欧美电影一区二区| 欧美一卡二卡在线| 精品国产一区二区国模嫣然| 欧美大片日本大片免费观看| 久久亚洲二区三区| 国产欧美视频一区二区| 国产精品麻豆网站| 亚洲精品高清在线| 午夜精品久久久久久久99水蜜桃| 婷婷综合久久一区二区三区| 日韩va欧美va亚洲va久久| 蜜臀久久久久久久| 国产资源在线一区| www.欧美精品一二区| 色94色欧美sute亚洲线路一久| 在线观看日产精品| 91精品久久久久久蜜臀| 久久综合狠狠综合| 日韩美女精品在线| 亚洲妇女屁股眼交7| 久久国产福利国产秒拍| 粉嫩av一区二区三区粉嫩| 91色porny蝌蚪| 91精品国产aⅴ一区二区| 久久婷婷国产综合精品青草| 国产欧美一二三区| 亚洲国产成人av| 久久99久久久欧美国产| 成+人+亚洲+综合天堂| 色哦色哦哦色天天综合| 欧美一区二区三区公司| 亚洲国产高清不卡| 亚洲一区二区综合| 国产一区福利在线| 一本色道**综合亚洲精品蜜桃冫| 91精品国产综合久久香蕉麻豆 | 欧美一三区三区四区免费在线看| 久久青草欧美一区二区三区| 亚洲免费观看高清完整版在线 | 人人狠狠综合久久亚洲| 丁香婷婷综合网| 欧美日韩国产电影| 国产日本欧美一区二区| 亚洲国产成人高清精品| 粉嫩av一区二区三区在线播放| 欧美视频在线不卡| 国产精品视频一二三区| 琪琪一区二区三区| 99re热这里只有精品免费视频 | 亚洲欧洲制服丝袜| 激情六月婷婷综合| 欧美三级一区二区| 国产精品美女久久久久久久久久久 | 亚洲激情综合网| 亚洲v精品v日韩v欧美v专区| 国产传媒一区在线| 宅男在线国产精品| 亚洲欧美另类小说| 国产一区在线看| 欧美一区二区三区日韩| 亚洲精品大片www| 国产精品18久久久久久久久| 欧美午夜精品理论片a级按摩| 久久人人97超碰com| 日韩av成人高清| 在线观看国产一区二区| 亚洲国产成人在线| 狠狠色狠狠色综合日日91app| 精品视频一区三区九区| 亚洲色图一区二区| 成人精品鲁一区一区二区| 精品久久国产字幕高潮| 香港成人在线视频| 日本国产一区二区| 亚洲欧美一区二区三区极速播放 | 91丨porny丨在线| 亚洲国产精品成人久久综合一区| 久久99国产精品尤物| 欧美高清一级片在线| 最新热久久免费视频| 国产成人精品免费看| 久久综合色婷婷| 国内一区二区在线| 欧美成人官网二区| 秋霞国产午夜精品免费视频| 欧美丰满少妇xxxxx高潮对白| 香蕉影视欧美成人| 欧美色国产精品| 亚洲一区二区三区三| 色综合咪咪久久| 一区二区日韩av| 欧美丰满一区二区免费视频| 视频一区二区中文字幕| 欧美日韩免费电影| 日本91福利区| 精品国产乱码久久久久久浪潮| 狠狠色狠狠色合久久伊人| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 国产欧美日韩在线看| 日本视频免费一区| 欧美电影在线免费观看| 亚洲欧美乱综合| 97精品国产97久久久久久久久久久久| 久久婷婷国产综合国色天香| 久久国产日韩欧美精品| 精品国产1区二区| 黄色日韩三级电影| 精品99久久久久久| 国内精品自线一区二区三区视频| 日韩欧美一区二区在线视频| 日韩av不卡一区二区| 欧美日韩你懂得| 玖玖九九国产精品| 精品99一区二区三区| 国产精品一级在线| 精品国产乱码久久久久久1区2区 | 国产成人小视频| 国产清纯在线一区二区www| av高清久久久| 亚洲第一综合色| 制服丝袜一区二区三区| 久色婷婷小香蕉久久| 国产精品久久久久久久浪潮网站| 99久久精品免费看| 亚洲精品视频一区二区| 欧美三级资源在线| 国产麻豆成人传媒免费观看| 中文av一区二区| 色婷婷精品大视频在线蜜桃视频| 亚洲综合免费观看高清在线观看| 欧美一级午夜免费电影| 国产在线精品视频| 国产精品色哟哟| 91电影在线观看| 久久99国产精品久久| 国产精品午夜电影| 欧美中文一区二区三区| 亚洲国产精品综合小说图片区| 欧美精品一区二区三区很污很色的| 大胆亚洲人体视频| 亚洲激情六月丁香| 欧洲生活片亚洲生活在线观看| 激情另类小说区图片区视频区| 国产精品视频免费看| 欧美电影一区二区| eeuss国产一区二区三区| 亚洲成人你懂的| 久久综合色综合88| 欧美综合亚洲图片综合区| 国产风韵犹存在线视精品| 亚洲一区二区av在线| 欧美大白屁股肥臀xxxxxx| 国产精品69久久久久水密桃| 婷婷开心激情综合| 国产精品久久久一本精品| 正在播放亚洲一区| 欧美曰成人黄网|