dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
23 lines (22 loc) • 852 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntityPathParser = void 0;
const index_js_1 = require("../../../entity/index.js");
const index_js_2 = require("../../../schema/actions/parsePaths/index.js");
const constants_js_1 = require("./constants.js");
class EntityPathParser extends index_js_1.EntityAction {
static express(paths) {
return index_js_2.PathParser.express(paths);
}
constructor(entity) {
super(entity);
this[constants_js_1.$pathParser] = new index_js_2.PathParser(entity.schema);
}
transform(paths, options) {
return this[constants_js_1.$pathParser].transform(paths, options);
}
parse(attributes, options) {
return this[constants_js_1.$pathParser].parse(attributes, options);
}
}
exports.EntityPathParser = EntityPathParser;