Add operator class and tests

This PR depends on #5 before it can be merged.

Also, the tests won't pass until the entity PR is merged.
$this is always useful for chaining calls.

For tests, you should check by querying the database.