惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

博客园 - jjxstudio

关于silverlight 前景的讨论,不吐不快 没有说说新的async ctp吗? 新blog地址 青春咖啡馆 2010 计划 axapta 断开的记录集 django 1.1 south 理解zope3 的适配器 准备放弃django openerp新的web-client openerp view design elements中的col和colspan - jjxstudio a中的this和element 上下文 怎样才算是一个好的windows forms 应用程序框架? 自定义django admin 之一 django admin search_fields 杭州:一个python的工作机会 ironpython的下一个版本
今天的折腾
jjxstudio · 2008-11-09 · via 博客园 - jjxstudio

首先是试着用ironpython 跑sqlalchemy 

1. 第一个问题是出在__solt__对于python私有变量的解释

python对私有变量约定用__开头,实际中,它被存储为_ClassName__variablename ,ironpython 在__solt__中说明时需要用实际存储的变量名

修改pool.py 中的

class _ConnectionFairy(object):
    """Proxies a DB-API connection and provides return-on-dereference support."""

    __slots__ = '_pool', '_ConnectionFairy__counter', 'connection', '_connection_record', '__weakref__', '_detached_info'

同样的问题还在_CursorFairy类中
class _CursorFairy(object):
    __slots__ = '_CursorFairy__parent', 'cursor', 'execute'

2. echo=True启用log时出现

ValueError: _getframe is not implemented for non-zero depth

用echo=False逃过

3.autoload=True时出现Key errors

 不使用autoload

在接下来的测试中出现了不少错误,如

select([categories.c.id,categories.c.name,func.count(products.c.id)],from_obj=[categories.join(products)]).group_by(categories.c.id,categories.c.name)

这个func.count 通不过,提示key error ,这个错误出现的概率还是停多的

然后试着用jython 跑sqlalchemy ,使用了http://fwierzbicki.blogspot.com/2007/07/sqlalchemy-mysql-and-jython.html 这里的实现,修改了logging/util.Set两个地方

但显然,生成的sql 有问题,像上面的 from 部分 是  from core_category ,core_product ,core_category inner join core_product

接着继续折腾zxJDBC ,这个是python的jdbc 的 dbapi实现,试了ms的sql server jdbc驱动,在select * from core_category 就出错,经查看是nvarchar的输出问题,如果单独使用jdbc ,这个问题是不存在