MinneStoreTM version 2.0

Protocol



Query protocol -- Go to the examples page to see how these methods are used together.

MinneStoreDB instance method Behavior
getAll: anObjectSetNameStart a query. Answers an instance of MSObjectSet
getOne: anObjectSetNameStart a query. Answers an instance of MSObjectSet
getCount: anObjectSetNameStart a query. Answers an instance of MSObjectSet
removeFromCache: anObjectRemove a previously retrieved object from the identity cache.

MSObjectSet instance method Behavior
where: indexName eq: aValueLimit query to values equal to aValue. aValue may be a collection of values.
where: indexName lt: aValueLimit query to values less than aValue
where: indexName le: aValueLimit query to values less than or equal to aValue
where: indexName gt: aValueLimit query to values greater than aValue
where: indexName ge: aValueLimit query to values greater than or equal to aValue
where: indexName between: aValue1 and: aValue2Limit query to values between aValue1 and aValue2 inclusive
where: indexName startsWith: aStringLimit query to values that start with aString.
(Use only with String domain indexes)
where: indexName hasWord: aStringLimit query to values including word aString.
(Use only with MSText domain indexes)
where: indexName hasAllWords: aStringLimit query to values including all words in aString.
(Use only with MSText domain indexes)
where: indexName hasSomeWords: aStringLimit query to values including at least one of the words in aString.
(Use only with MSText domain indexes)
executeAnswers the objects that match the preceding criteria

Note: Any of the "where:" methods can have "and:" or "or:" in place of the "where:"


Database definition protocol

MinneStoreDB method Behavior
class>>newOn: pathNameStringDefine a new database on pathNameString. Answers an instance of MinneStoreDB.
class>>openOn: pathNameStringOpen an existing database on pathNameString. Answers an instance of MinneStoreDB.
supportSingleUserDefault -- use no object locking.
supportMultipleUsersUse object locking to maintain object integrity for many users.
addObjectSetNamed: aSymbolDefine a new object set. Answers an instance of MSObjectSet.

MSObjectSet instance method Behavior
objectsPerFile: anIntegerDefines how many objects to be stored in each data file of this object set. Do not change this number once objects have been stored to it.
storesClass: aClassDefines which class(es) will be stored in this object set.
indexOn: aSymbol domain: aClassaSymbol is the object method selector that answers the value to be indexed.
aspect: aspectName getter: aSymbol1 setter: aSymbol2 hasOne: objectSetNameDefine a one-to-one aspect of this object set. Aspects are stored in their own object set.
aspect: aspectName hasOne: objectSetNameSame as above, but assume the getter method is the same as aspectName. Setter adds a colon to the end.
aspect: aspectName getter: aSymbol1 setter: aSymbol2 hasMany: objectSetNameDefine a one-to-many aspect of this object set. Aspects are stored in their own object set.
aspect: aspectName hasMany: objectSetNameSame as above, but assume the getter method is the same as aspectName. Setter adds a colon to the end.
hasChangedMethod: aSymbolMethod named aSymbol should answer true or false whether object has changed since last read or not.
beforeStoringMethod: aSymbolMethod named aSymbol will be sent to an object before storing it.
afterStoringMethod: aSymbolMethod named aSymbol will be sent to an object after storing it.
afterGettingMethod: aSymbolMethod named aSymbol will be sent to an object after reading it.

FAQ's | Features | GNU License | Protocol | Examples | Download

Send suggestions, questions, etc...
Return to MinneStore main page.