Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/sqlite3/executescript.py @ 38069:cf19a123a5d9 legacy-trunk
Further integration of the documentation for the sqlite3 module. There's still
quite some content to move over from the pysqlite manual, but it's a start now.
| author | Gerhard Häring <gh@ghaering.de> |
|---|---|
| date | Mon, 01 May 2006 15:14:48 +0000 |
| parents | |
| children | 204ec383b445 |
| rev | line source |
|---|---|
|
38069
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
1 import sqlite3 |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
2 |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
3 con = sqlite3.connect(":memory:") |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
4 cur = con.cursor() |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
5 cur.executescript(""" |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
6 create table person( |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
7 firstname, |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
8 lastname, |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
9 age |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
10 ); |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
11 |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
12 create table book( |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
13 title, |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
14 author, |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
15 published |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
16 ); |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
17 |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
18 insert into book(title, author, published) |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
19 values ( |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
20 'Dirk Gently''s Holistic Detective Agency |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
21 'Douglas Adams', |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
22 1987 |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
23 ); |
|
cf19a123a5d9
Further integration of the documentation for the sqlite3 module. There's still
Gerhard Häring <gh@ghaering.de>
parents:
diff
changeset
|
24 """) |
