Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36426
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <morten.guldager@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'python': 0.09; 'library...': 0.09; 'oh,': 0.09; 'semantics': 0.09; 'programmer': 0.11; 'result.': 0.15; '"import': 0.16; 'batteries': 0.16; 'fine.': 0.16; 'for,': 0.16; 'handle,': 0.16; 'larger,': 0.16; 'subject:accessing': 0.16; 'implementing': 0.17; 'subject:need': 0.17; 'equivalent': 0.20; 'trying': 0.21; 'recognize': 0.22; 'seems': 0.23; 'environment.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'perl': 0.29; 'piece': 0.29; 'subject:like': 0.29; '8bit%:5': 0.29; 'included': 0.29; "i'm": 0.29; 'becomes': 0.30; 'query': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'sometimes': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'flow': 0.36; 'should': 0.36; 'being': 0.37; 'quite': 0.37; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'most': 0.61; 'subject:, ': 0.61; 'burden': 0.65; 'grow': 0.74; 'inefficient': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=egZgzGDgC+kpMHhOqNPm9M2vOTwbaN+ktC67SZ6ZgGA=; b=EFPEtPPzOuJHzMovdA+zxlYO1hrHa0Bm1G9Uo6dO3ICH3Ym9POPHjcHCrl/NwzHguh nFRFj/YKvyGjIFzXD3YL/98OA1wIwukqjFYtZ6w+aylx4BNAV0Nsy/0wC+TaKchyxRse ZoVmZCDRcyMqJQ31OxT9QG/GFqalDzWMLQCzQJhOGfa6S+HmeCBLTDdrKz9o7fmWnqyD Y7JfPhWY4eQ+cO4s5La2fMsIun7cfiQ6gDI5xv+K5mh8/wGdAAkL4Eebt08ILfME89GA bgCfqVRTLD8r/3u0FBjOhp7p2CJyMGSHOu87yjLFQR3vkgzL41FOU6Apf66Tb+HHX19y SvxA== |
| MIME-Version | 1.0 |
| Date | Tue, 8 Jan 2013 13:45:51 +0100 |
| Subject | Newbe accessing MySQL, need something like perl's prepare_cached |
| From | Morten Guldager <morten.guldager@gmail.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=f46d040169136cb2c704d2c65330 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.271.1357649160.2939.python-list@python.org> (permalink) |
| Lines | 50 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357649160 news.xs4all.nl 6980 [2001:888:2000:d::a6]:40287 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:36426 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
'Aloha Friends! Still quite new to python I'm trying to access a MySQL database. Being a former perl programmer I recognize much of the semantics going on. Create a database handle, compile a piece of SQL and put it into a cursor, run the query and use the result. exactly the same flow as I am used to. And it works just fine. But as programs grow larger, it is sometimes becomes a burden to compile those SQL's over and over again when they should be perfectly reusable. And implementing a "query cache" by myself seems not to be the right thing in this batteries included environment. Donno exactly what I'm looking for, but the perl equivalent is called prepare_cached. Oh, by the way, I'm using "import MySQLdb", hope that's not the most outdated, inefficient and stupid choice for a MySQL library... -- /Morten %-)
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Newbe accessing MySQL, need something like perl's prepare_cached Morten Guldager <morten.guldager@gmail.com> - 2013-01-08 13:45 +0100
csiph-web