Next: Documentation of the API Up: MySQL occam- API Previous: Benchmark Contents

#
Tests and examples

The distribution of MoA includes two test programs, `test1.occ` and `test2.occ`, that documents the working of most of the API. When run, the programs should result in deadlocks if all is okay, they will give a run-time error if not. See the source for comments on how to make the tests run - currently, they are hard-coded to use a specific server.

The distribution also includes an example program, `simple.occ` (see section 8.3). It is intended as a simple example of how to make a connection and receive data. It will crash in case of any error. As this program is only intended to demonstrate the use of the API, it is hard-coded to use a specific server.

Finally, `mysqlclient.occ` is a simple CLI client for MySQL, providing basic functionality by allowing the user to connect to a database and execute SQL queries.