Thesaurus (Ruby, GTK2, SQLite)

Download Sources

Example of how to use generated data access code

ds = DataStore.new

ds.connect

dao = ThesaurusDao.new(ds)

words = dao.get_words_by_key(key)

words.each do |w|
  # process the list item
end

ds.disconnect

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>