MarkLogic 10 Product Documentation
ordt.redactEmail

ordt.redactEmail(
   column as String,
   options as object?
) as columnBinding

Summary

This function redacts a column with email address string that conforms to the pattern name@domain. This function can be used with op.bind or op.select .

Parameters
column The name of the column to be redacted. This can be either a string or the return value from op.col, op.viewCol, or op.schemaCol.
options The options for masking the value the column.

Usage Notes

The options consist of the following properties:

Example

const op   = require('/MarkLogic/optic');
const ordt = require('/MarkLogic/optic/optic-redaction.sjs');

op.fromView('main', 'employees')
  .bind([
     ordt.redactEmail(op.schemaCol('main', 'employees', 'contact'), {level:'name'})
     ])
  .result();

  

Example

const op   = require('/MarkLogic/optic');
const ordt = require('/MarkLogic/optic/optic-redaction.sjs');

op.fromView('main', 'employees')
  .select([
     ordt.redactEmail(op.schemaCol('main', 'employees', 'contact'), {level:'name'})
     ])
  .result();

  
Powered by MarkLogic Server | Terms of Use | Privacy Policy