Mercurial > p > roundup > code
view scripts/hyperdb_example.py @ 3544:5cd1c83dea50
Features and fixes.
Feature:
- trackers may configure custom stop-words for the full-text indexer
Fixed:
- fixes in scripts/import_sf.py
- fix some unicode bugs in roundup-admin import
- Xapian indexer wasn't actually being used
- fix indexing of message content on roundup-admin import
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 06 Feb 2006 21:00:47 +0000 |
| parents | d819ff1b3116 |
| children |
line wrap: on
line source
from roundup.hyperdb import String, Number, Multilink from roundup.backends.back_bsddb import Database, Class class config: DATABASE='/tmp/hyperdb_example' db = Database(config, 'admin') spam = Class(db, 'spam', name=String(), size=Number()) widget = Class(db, 'widget', title=String(), spam=Multilink('spam')) oneid = spam.create(name='one', size=1) twoid = spam.create(name='two', size=2) widgetid = widget.create(title='a widget', spam=[oneid, twoid]) # dumb, simple query print widget.find(spam=oneid) print widget.history(widgetid) print widget.search_text(
