druid-query
Version:
Simple querying for Druid
20 lines (15 loc) • 356 B
JavaScript
var FieldError = require('../../errors').FieldError
/**
* PartialDimExtractionFn
*
* @see http://druid.io/docs/0.6.121/DimensionSpecs.html
*
* @param {string} regex Regular expression to match
*/
module.exports = function(regex) {
if (!regex) {
throw new FieldError('Missing regular expression')
}
this.expr = regex + ''
}