python类PrepareProtocol()的实例源码

types.py 文件源码 项目:hostapd-mana 作者: adde88 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:hostapd-mana 作者: adde88 项目源码 文件源码 阅读 47 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:vsphere-storage-for-docker 作者: vmware 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:vsphere-storage-for-docker 作者: vmware 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
extensions.py 文件源码 项目:pyrqlite 作者: rqlite 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def register_adapter(type_, function):
    adapters[(type_, sqlite3.PrepareProtocol)] = function
extensions.py 文件源码 项目:pyrqlite 作者: rqlite 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def _adapt_from_python(value):
    if not isinstance(value, basestring):
        adapter_key = (type(value), sqlite3.PrepareProtocol)
        adapter = adapters.get(adapter_key)
        try:
            if adapter is None:
                # Fall back to _default_adapters, so that ObjectAdaptationTests
                # teardown will correctly restore the default state.
                adapter = _default_adapters[adapter_key]
        except KeyError as e:
            # No adapter registered. Let the object adapt itself via PEP-246.
            # It has been rejected by the BDFL, but is still implemented
            # on stdlib sqlite3 module even on Python 3 !!
            if hasattr(value, '__adapt__'):
                adapted = value.__adapt__(sqlite3.PrepareProtocol)
            elif hasattr(value, '__conform__'):
                adapted = value.__conform__(sqlite3.PrepareProtocol)
            else:
                raise InterfaceError(e)
        else:
            adapted = adapter(value)
    else:
        adapted = value

    # The adapter could had returned a string
    if isinstance(adapted, (bytes, unicode)):
        adapted = _escape_string(adapted)
    elif adapted is None:
        adapted = 'NULL'
    else:
        adapted = str(adapted)

    return adapted
types.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:oil 作者: oilshell 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:oil 作者: oilshell 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 130 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
adapter_point_1.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
        if protocol is sqlite3.PrepareProtocol:
            return "%f;%f" % (self.x, self.y)
types.py 文件源码 项目:sslstrip-hsts-openwrt 作者: adde88 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:sslstrip-hsts-openwrt 作者: adde88 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:ndk-python 作者: gittor 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:ndk-python 作者: gittor 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()
types.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __conform__(self, protocol):
            if protocol is sqlite.PrepareProtocol:
                return self.val
            else:
                return None
types.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def tearDown(self):
        del sqlite.adapters[(int, sqlite.PrepareProtocol)]
        self.cur.close()
        self.con.close()


问题


面经


文章

微信
公众号

扫码关注公众号