Insert with Interceptor

{
  "username" : "root",
  "password" : "root",
  "ds" : "datastore1",
  "c" : "collection1",
  "q" : "insert",
  "p" : {
    "type" : "json",
    "interceptor" : "MyInterceptor",
    "data" : [{"json" : 1},{"json" : 2}]
  }
}

This insert can be applied on any type of insert including auto inferred data type. The inserted data will be passed through the specified interceptor. The interceptor can perform changes in data, add or remove columns in the data and modify it as necessary before it is actually inserted. The data actually inserted can be different from the one provided in the query, if the interceptor causes the data to be changed.

Example interceptors would be to remove empty spaces from string fields, or to round-off numbers, or extract first and last name values from a single name field.

The response of this insert operation is exactly same as that of a regular insert.