PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Doc/includes/sqlite3/executescript.py

http://unladen-swallow.googlecode.com/
Python | 24 lines | 23 code | 1 blank | 0 comment | 0 complexity | a640f6fd15777ca696e0860e6f13b2f6 MD5 | raw file
 1import sqlite3
 2
 3con = sqlite3.connect(":memory:")
 4cur = con.cursor()
 5cur.executescript("""
 6    create table person(
 7        firstname,
 8        lastname,
 9        age
10    );
11
12    create table book(
13        title,
14        author,
15        published
16    );
17
18    insert into book(title, author, published)
19    values (
20        'Dirk Gently''s Holistic Detective Agency',
21        'Douglas Adams',
22        1987
23    );
24    """)