Mercurial > p > roundup > code
comparison roundup/templates/extended/dbinit.py @ 858:2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 14 Jul 2002 02:05:54 +0000 |
| parents | 0779ea9f1f18 |
| children | 502a5ae11cc5 |
comparison
equal
deleted
inserted
replaced
| 857:6dd691e37aa8 | 858:2dd862af72ee |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: dbinit.py,v 1.22 2002-07-09 03:02:53 richard Exp $ | 18 # $Id: dbinit.py,v 1.23 2002-07-14 02:05:54 richard Exp $ |
| 19 | 19 |
| 20 import os | 20 import os |
| 21 | 21 |
| 22 import instance_config | 22 import instance_config |
| 23 from roundup import roundupdb | 23 from select_db import Database, Class, FileClass, IssueClass |
| 24 import select_db | 24 |
| 25 | |
| 26 from roundup.roundupdb import Class, FileClass | |
| 27 | |
| 28 class Database(roundupdb.Database, select_db.Database): | |
| 29 ''' Creates a hybrid database from: | |
| 30 . the selected database back-end from select_db | |
| 31 . the roundup extensions from roundupdb | |
| 32 ''' | |
| 33 pass | |
| 34 | |
| 35 class IssueClass(roundupdb.IssueClass): | |
| 36 ''' issues need the email information | |
| 37 ''' | |
| 38 pass | |
| 39 | |
| 40 | |
| 41 def open(name=None): | 25 def open(name=None): |
| 42 ''' as from the roundupdb method openDB | 26 ''' as from the roundupdb method openDB |
| 43 | 27 |
| 44 ''' | 28 ''' |
| 45 from roundup.hyperdb import String, Password, Date, Link, Multilink | 29 from roundup.hyperdb import String, Password, Date, Link, Multilink |
| 193 | 177 |
| 194 db.commit() | 178 db.commit() |
| 195 | 179 |
| 196 # | 180 # |
| 197 # $Log: not supported by cvs2svn $ | 181 # $Log: not supported by cvs2svn $ |
| 182 # Revision 1.22 2002/07/09 03:02:53 richard | |
| 183 # More indexer work: | |
| 184 # - all String properties may now be indexed too. Currently there's a bit of | |
| 185 # "issue" specific code in the actual searching which needs to be | |
| 186 # addressed. In a nutshell: | |
| 187 # + pass 'indexme="yes"' as a String() property initialisation arg, eg: | |
| 188 # file = FileClass(db, "file", name=String(), type=String(), | |
| 189 # comment=String(indexme="yes")) | |
| 190 # + the comment will then be indexed and be searchable, with the results | |
| 191 # related back to the issue that the file is linked to | |
| 192 # - as a result of this work, the FileClass has a default MIME type that may | |
| 193 # be overridden in a subclass, or by the use of a "type" property as is | |
| 194 # done in the default templates. | |
| 195 # - the regeneration of the indexes (if necessary) is done once the schema is | |
| 196 # set up in the dbinit. | |
| 197 # | |
| 198 # Revision 1.21 2002/05/24 04:03:23 richard | 198 # Revision 1.21 2002/05/24 04:03:23 richard |
| 199 # Added commentage to the dbinit files to help people with their | 199 # Added commentage to the dbinit files to help people with their |
| 200 # customisation. | 200 # customisation. |
| 201 # | 201 # |
| 202 # Revision 1.20 2002/02/15 07:08:44 richard | 202 # Revision 1.20 2002/02/15 07:08:44 richard |
