不要怂,就是干,撸起袖子干!

Commit dc418750 by Chocobozzz Committed by Simon Schick

fix(types): add random function to sequelize

fix(types): add random function to sequelize
1 parent 42927d3e
......@@ -1134,6 +1134,11 @@ export class Sequelize extends Hooks {
public query(sql: string | { query: string; values: unknown[] }, options?: QueryOptions | QueryOptionsWithType<QueryTypes.RAW>): Promise<unknown[]>;
/**
* Get the fn for random based on the dialect
*/
public random(): Fn;
/**
* Execute a query which would set an environment or user variable. The variables are set per connection,
* so this function needs a transaction.
*
......
import { Config, Sequelize, Model } from 'sequelize';
import { Fn } from '../lib/utils';
Sequelize.useCLS({
});
......@@ -46,4 +47,6 @@ Sequelize.afterConnect(() => {
});
const rnd: Fn = sequelize.random();
const myModel: typeof Model = sequelize.models.asd;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!