Add 'after' constraint.
Add basic query codegen.