UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

19 lines (18 loc) 620 B
import { EntityAction } from '../../../entity/index.js'; import { PathParser } from '../../../schema/actions/parsePaths/index.js'; import { $pathParser } from './constants.js'; export class EntityPathParser extends EntityAction { static express(paths) { return PathParser.express(paths); } constructor(entity) { super(entity); this[$pathParser] = new PathParser(entity.schema); } transform(paths, options) { return this[$pathParser].transform(paths, options); } parse(attributes, options) { return this[$pathParser].parse(attributes, options); } }