Allow TreeConstraints to be applied to insert/update requests #7

* write constraints