nine/caps: big update
nine/query: implement queries