Io Reference







Databases   /   TagDB   /   TagDB





Binding for tagdb - a tagging database usefull for flickr-like tag searches.

Example use:

tdb := TagDB clone

tdb setPath("test")
tdb open

writeln("size = ", tdb size)
tdb atKeyPutTags("f430 for sale", list("red", "ferrari"))
tdb atKeyPutTags("lotus esprit", list("lotus", "esprit"))
writeln("size = ", tdb size)
keys := tdb keysForTags(list("lotus"))
writeln("keys = ", tdb symbolForId(keys at(0)))
tdb close
tdb delete
 
 
 



allUniqueTagIds

Returns a list of all unique tag ids.
atKeyPutTags(key, tagNameList)

Sets the tags for key to those in tagNameList. Returns self.
close

Close the tagdb. Returns self.
delete

Deletes all keys in the database.
idForSymbol(aSeq)

Returns the TagDB id Number for the symbol specified by aSeq.
keyAtIndex(indexNumber)

Returns the key at the specified index of nil if the index is out of range.
keysForTags(aTagNameList)

Returns list of keys whose tags contain all of the tags in aTagNameList.
open

Open the tagdb. Returns self.
removeKey(aKey)

Removes the specified key if it is present. Returns self.
setPath(aPath)

Sets the path to the tag database. Returns self.
size

Returns number of keys in the database.
symbolForId(aNumber)

Returns the TagDB symbol for aNumber.
tagsAtKey(key)

Returns the tags for the specified key.
uniqueTagNames

Returns a list of all unique tag names.