MinneStoreTM version 2.0

Object Storage & Retrieval System for Visual Smalltalk v3.1

Syntax Examples



An example of setting up a database...
   db := MinneStoreDB newOn: 'T:\MYDB\'.
   db supportMultipleUsers.

   (db addObjectSetNamed: #Names)
      objectsPerFile: 3;
      storesClass: TestName;
      indexOn: #lastName domain: String;
      indexOn: #firstName domain: String;
      yourself.

   (db objectSetNamed: #Person)
      objectsPerFile: 5;
      storesClass: TestPerson;
      indexOn: #age domain: Integer getter: #basicAge;
      indexOn: #description domain: MSText;
      aspect: #name holdsOne: #Name getter: #basicName;
      yourself;
   db save.



An example of retrieving from the database...
   db := MinneStoreDB openOn: 'T:\MYDB\'.
   (db getAll: #Persons)
      where: #lastName eq: 'Carlson';
      and: #age lt: 40;
      execute.

   (db getOne: #Persons)
      where: #description hasWord: 'blonde';
      execute.

   (db getAll: #Names)
      where: #firstName eq: (Array with: 'Jonathan' with: 'Debra');
      or: #age eq: 30;
      execute.



An example of storing an object or objects to the database...

   db := MinneStoreDB openOn: 'T:\MYDB\'.
   db store: aPerson.
   db storeAll: aCollectionOfPersons.



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

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