Back to index


Main features OOFILE adds to C-tree as a database

(apart from our GUI integration, report-writer and charting classes)

1) Ease of declaration to define a database with real fields, not just record lengths.

DECLARE_CLASS(dbPeople)
dbChar LastName;
dbReal Salary;

dbPeople :
LastName(80, "Last Name", kIndexCompress),
Salary("Salary", kIndexed)
{};
};

// define the actual database - one connection contains many tables
dbConnect_ctree theDb;
dbPeople People;

// open a database
theDB.openConnection("Test.db");

2) Simple access to fields, like dBase or any other 4GL:

People.LastName = "Dent";

3) Searching using C++ syntax (including automatic use of compound indices):

People.search(People.LastName == "Dent" || People.Salary >= 50000);

4) Set operations:

People.union_with(anotherPeopleCollection);
// or, using operator syntax
People += anotherPeopleCollection;

5) Relationships with referential integrity, eg: saving related records in a medical database:

Patients.search(Patients.PatientCode = "Dent001");
if (Patients.count()==1) {
Patients.Visits->newRecord();
Patients.Visits->Date = "25/1/96";
Patients.Visits->Why = "Flu";

Patients.Visits->newRecord(); // caches dirty record created above
Patients.Visits->Date = "May 26th"; // flexible date parsing
Patients.Visits->Why = "Flu";
Patients.saveRecord(); // propagates save to new Visits records
}

6) Sorting of selections (including automatic resorting after searches or other changes).

7) Wildcard searches, with * and ? wildcards:

People.search(People.LastName == "D*t");

8) Multi-level sorting, regardless of indices.

dbSorter AccountsOrder;
AccountsOrder << reverse(Accounts.LastSale) << Accounts.Company << Accounts.Branch;
People.setSortOrder(AccountsOrder);

Features coming in v1.3:
- keyword indexing
- phonetic indexing


Back to index


(c) Copyright A.D. Software 1994-1997 (All Rights Reserved).
Last Updated: 8th March 1997