UNPKG

@dolittle/sdk.projections

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

31 lines 1.9 kB
"use strict"; // Copyright (c) Dolittle. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. Object.defineProperty(exports, "__esModule", { value: true }); exports.PropertyNameKeySelector = void 0; const concepts_1 = require("@dolittle/concepts"); /** * Represents a projection key selector expression. */ class PropertyNameKeySelector extends concepts_1.ConceptAs { /** * Initializes a new instance of {@link PropertyNameKeySelector}. * @param {string} expression - The expression that specifices the key selection. */ constructor(expression) { super(expression, '@dolittle/sdk.projections.PropertyNameKeySelector'); } /** * Creates a {@link PropertyNameKeySelector} from a string. * @param {string | PropertyNameKeySelector} expression - The expression to convert. * @returns {PropertyNameKeySelector} The converted key selector. */ static from(expression) { if (expression instanceof PropertyNameKeySelector) { return expression; } return new PropertyNameKeySelector(expression); } } exports.PropertyNameKeySelector = PropertyNameKeySelector; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvcGVydHlOYW1lS2V5U2VsZWN0b3IuanMiLCJzb3VyY2VSb290IjoiLi4vIiwic291cmNlcyI6WyJQcm9wZXJ0eU5hbWVLZXlTZWxlY3Rvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0NBQStDO0FBQy9DLHFHQUFxRzs7O0FBRXJHLGlEQUErQztBQUUvQzs7R0FFRztBQUNILE1BQWEsdUJBQXdCLFNBQVEsb0JBQXNFO0lBQy9HOzs7T0FHRztJQUNILFlBQVksVUFBa0I7UUFDMUIsS0FBSyxDQUFDLFVBQVUsRUFBRSxtREFBbUQsQ0FBQyxDQUFDO0lBQzNFLENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLElBQUksQ0FBQyxVQUE0QztRQUNwRCxJQUFJLFVBQVUsWUFBWSx1QkFBdUIsRUFBRTtZQUFDLE9BQU8sVUFBVSxDQUFDO1NBQUM7UUFDdkUsT0FBTyxJQUFJLHVCQUF1QixDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQ25ELENBQUM7Q0FDSjtBQWxCRCwwREFrQkMifQ==