Thesaurus (Python, Tkinter, SQLite)

Download Sources

Example of how to use generated data access code

ds = DataStore()
ds.open()
dao = ThesaurusDao(ds)
try:
    self.words = dao.get_words_by_key(self.entry.get() + "%")
    for word in self.words:
        # process the list
finally:
    ds.close()

XML meta-program

<dto-classes>		
	<dto-class name="Word" ref="WORDS" />
	<dto-class name="RelatedWord" ref="thesaurus/getRelatedWords.sql" />
</dto-classes>
<dao-class>		
	<query-dto-list ref="thesaurus/getWordsByKey.sql" dto="Word"
			method="get_words_by_key(key)" />
	<query-dto-list ref="thesaurus/getRelatedWords.sql" dto="RelatedWord" 
			method="get_related_words(Long w_id)" />
</dao-class>