MinneStoreDB instance method | Behavior |
getAll: anObjectSetName | Start a query. Answers an instance of MSObjectSet |
getOne: anObjectSetName | Start a query. Answers an instance of MSObjectSet |
getCount: anObjectSetName | Start a query. Answers an instance of MSObjectSet |
removeFromCache: anObject | Remove a previously retrieved object from the identity cache. |
MSObjectSet instance method | Behavior |
where: indexName eq: aValue | Limit query to values equal to aValue. aValue may be a collection of values. |
where: indexName lt: aValue | Limit query to values less than aValue |
where: indexName le: aValue | Limit query to values less than or equal to aValue |
where: indexName gt: aValue | Limit query to values greater than aValue |
where: indexName ge: aValue | Limit query to values greater than or equal to aValue |
where: indexName between: aValue1 and: aValue2 | Limit query to values between aValue1 and aValue2 inclusive |
where: indexName startsWith: aString | Limit query to values that start with aString. (Use only with String domain indexes) |
where: indexName hasWord: aString | Limit query to values including word aString. (Use only with MSText domain indexes) |
where: indexName hasAllWords: aString | Limit query to values including all words in aString. (Use only with MSText domain indexes) |
where: indexName hasSomeWords: aString | Limit query to values including at least one of the words in aString. (Use only with MSText domain indexes) |
execute | Answers 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: pathNameString | Define a new database on pathNameString. Answers an instance of MinneStoreDB. |
class>>openOn: pathNameString | Open an existing database on pathNameString. Answers an instance of MinneStoreDB. |
supportSingleUser | Default -- use no object locking. |
supportMultipleUsers | Use object locking to maintain object integrity for many users. |
addObjectSetNamed: aSymbol | Define a new object set. Answers an instance of MSObjectSet. |
MSObjectSet instance method | Behavior |
objectsPerFile: anInteger | Defines 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: aClass | Defines which class(es) will be stored in this object set. |
indexOn: aSymbol domain: aClass | aSymbol is the object method selector that answers the value to be indexed. |
aspect: aspectName getter: aSymbol1 setter: aSymbol2 hasOne: objectSetName | Define a one-to-one aspect of this object set. Aspects are stored in their own object set. |
aspect: aspectName hasOne: objectSetName | Same 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: objectSetName | Define a one-to-many aspect of this object set. Aspects are stored in their own object set. |
aspect: aspectName hasMany: objectSetName | Same as above, but assume the getter method is the same as aspectName. Setter adds a colon to the end. |
hasChangedMethod: aSymbol | Method named aSymbol should answer true or false whether object has changed since last read or not. |
beforeStoringMethod: aSymbol | Method named aSymbol will be sent to an object before storing it. |
afterStoringMethod: aSymbol | Method named aSymbol will be sent to an object after storing it. |
afterGettingMethod: aSymbol | Method named aSymbol will be sent to an object after reading it. |