Mercurial > p > roundup > code
comparison roundup/backends/back_sqlite.py @ 1836:94e430ad4fdb
make the RDBMS common backend and the SQLite and MYsql backend create...
...and drop indexes for the basic columns - index multilinks, index id and
retired columns of all class tables.
| author | Anthony Baxter <anthonybaxter@users.sourceforge.net> |
|---|---|
| date | Tue, 07 Oct 2003 07:17:54 +0000 |
| parents | 2fc7d4a8c9e7 |
| children | f255363e6d97 |
comparison
equal
deleted
inserted
replaced
| 1835:461d8aa81376 | 1836:94e430ad4fdb |
|---|---|
| 1 # $Id: back_sqlite.py,v 1.9 2003-03-06 06:03:51 richard Exp $ | 1 # $Id: back_sqlite.py,v 1.10 2003-10-07 07:17:54 anthonybaxter Exp $ |
| 2 __doc__ = ''' | 2 __doc__ = ''' |
| 3 See https://pysqlite.sourceforge.net/ for pysqlite info | 3 See https://pysqlite.sourceforge.net/ for pysqlite info |
| 4 ''' | 4 ''' |
| 5 import base64, marshal | 5 import base64, marshal |
| 6 from roundup.backends.rdbms_common import * | 6 from roundup.backends.rdbms_common import * |
| 30 if str(error) != 'no such table: schema': | 30 if str(error) != 'no such table: schema': |
| 31 raise | 31 raise |
| 32 self.database_schema = {} | 32 self.database_schema = {} |
| 33 self.cursor.execute('create table schema (schema varchar)') | 33 self.cursor.execute('create table schema (schema varchar)') |
| 34 self.cursor.execute('create table ids (name varchar, num integer)') | 34 self.cursor.execute('create table ids (name varchar, num integer)') |
| 35 self.cursor.execute('create index ids_name_idx on ids(name)') | |
| 35 | 36 |
| 36 def close(self): | 37 def close(self): |
| 37 ''' Close off the connection. | 38 ''' Close off the connection. |
| 38 | 39 |
| 39 Squash any error caused by us already having closed the | 40 Squash any error caused by us already having closed the |
