{"provider_name":"Hatena Blog","published":"2016-02-02 21:14:39","height":"190","type":"rich","author_name":"danglingfarpointer","author_url":"https://blog.hatena.ne.jp/danglingfarpointer/","url":"https://danglingfarpointer.hatenablog.com/entry/2016/02/02/211439","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdanglingfarpointer.hatenablog.com%2Fentry%2F2016%2F02%2F02%2F211439\" title=\"Python\u3067SQLite3 - danglingfarpointer&#39;s memoization\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","provider_url":"https://hatena.blog","image_url":null,"categories":["Python"],"blog_title":"danglingfarpointer's memoization","blog_url":"https://danglingfarpointer.hatenablog.com/","description":"Python\u3067SQLite3\u306e\u4f7f\u3044\u65b9\u306e\u30e1\u30e2\u3067\u3059\u3002 SQLite3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30a4\u30f3\u30dd\u30fc\u30c8 import sqlite3 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u3092\u53d6\u5f97 conn = sqlite3.connect('warehouse.db') \u5f15\u6570\u3067DB\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30ab\u30fc\u30bd\u30eb\u306e\u53d6\u5f97 cur = conn.cursor() \u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304b\u3089\u30ab\u30fc\u30bd\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u30ab\u30fc\u30bd\u30eb\u3092\u901a\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u5024\u3092\u53d6\u308a\u51fa\u3057\u305f\u308a\u3001\u66f4\u65b0\u3057\u305f\u308a\u3057\u307e\u3059\u3002 SQL\u6587\u5b9f\u884c cur.execute('....<SQL>...') \u7d50\u679c\u306e\u53d6\u5f97 cur.fetchall() SQL\u306e\u5b9f\u884c\u7d50\u679c\u3092\u53d6\u5f97\u3057\u307e\u3059\u30021\u3064\u3060\u3051\u53d6\u5f97\u3059\u308bfetchone\u2026","title":"Python\u3067SQLite3"}