8000 Redis client tipi güncellendi by saracalihan · Pull Request #19 · anchovycation/metronom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Redis client tipi 8000 güncellendi #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/Model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createClient, RedisClientOptions } from 'redis';
import { createClient, RedisClientOptions, RedisClientType } from 'redis';
import ModelInstance from './ModelInstance';
import {
isObject, getKeyValue, safeWrite, safeRead,
Expand All @@ -20,7 +20,7 @@ class Model {

public schema: Object;

public redisClient: any;
public redisClient: RedisClientType<any, any>;

public flexSchema: Boolean | undefined;

Expand Down Expand Up @@ -76,7 +76,7 @@ class Model {
}

public async deleteAll(options?: any) {
const keys: String[] = await this.redisClient.keys(`${this.keyPrefix}:*`);
const keys: any = await this.redisClient.keys(`${this.keyPrefix}:*`);
return keys.length > 0 ? await this.redisClient.del(keys) : 0;
}

Expand All @@ -103,7 +103,7 @@ class Model {
9760 return `${this.keyPrefix}:${u}`;
}

public async runCommand(commands: Array<String>): Promise<any> {
public async runCommand(commands: any | Array<String>): Promise<any> {
return await this.redisClient.sendCommand(commands); // ['hget', 'user:1', 'name']
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metronom",
"version": "1.1.1",
"version": "1.1.2",
"description": "Easy to use Redis ORM based on node-redis",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
0