Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/sync/node_modules/@redis/time-series/dist/lib/commands/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseFilterArgument = exports.parseLatestArgument = void 0;
const helpers_1 = require("./helpers");
/**
* Adds LATEST argument to command if specified
* @param parser - The command parser
* @param latest - Whether to include the LATEST argument
*/
function parseLatestArgument(parser, latest) {
if (latest) {
parser.push('LATEST');
}
}
exports.parseLatestArgument = parseLatestArgument;
/**
* Adds FILTER argument to command
* @param parser - The command parser
* @param filter - Filter to match time series keys
*/
function parseFilterArgument(parser, filter) {
parser.push('FILTER');
parser.pushVariadic(filter);
}
exports.parseFilterArgument = parseFilterArgument;
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
/**
* Gets the last samples matching a specific filter from multiple time series
* @param parser - The command parser
* @param filter - Filter to match time series keys
* @param options - Optional parameters for the command
*/
parseCommand(parser, filter, options) {
parser.push('TS.MGET');
parseLatestArgument(parser, options?.LATEST);
parseFilterArgument(parser, filter);
},
transformReply: {
2(reply, _, typeMapping) {
return (0, helpers_1.resp2MapToValue)(reply, ([, , sample]) => {
return {
sample: helpers_1.transformSampleReply[2](sample)
};
}, typeMapping);
},
3(reply) {
return (0, helpers_1.resp3MapToValue)(reply, ([, sample]) => {
return {
sample: helpers_1.transformSampleReply[3](sample)
};
});
}
}
};
//# sourceMappingURL=MGET.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0247 ]-- |