Access

Refer to the figure on the right.

In Boxary the access to data is described in a Given, When, Then model. The syntax is relaxed using user defined names pointing to a sql table or qualified column names (name.column).

Given (manifest):

  • orders => Orders,
  • customers => Customers,
  • lines => OrderLines,
  • cc => CreditCards;

When (conditions):

  • customers => 'orders.customerID == customers.customerID',
  • lines => 'orders.orderID == lines.orderID',
  • cc => 'customers.customerID == cc.customerID';

Then (retrieval):

  • orders.orderID,
  • customers.custID,
  • lines.linesID, lines.quantity, lines.price,
  • cc.*

Given limits the scenery, When follows the path; Then opens the door and retrieves.