Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit dc418750
authored
Apr 30, 2019
by
Chocobozzz
Committed by
Simon Schick
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(types): add random function to sequelize
fix(types): add random function to sequelize
1 parent
42927d3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
types/lib/sequelize.d.ts
types/test/sequelize.ts
types/lib/sequelize.d.ts
View file @
dc41875
...
@@ -1134,6 +1134,11 @@ export class Sequelize extends Hooks {
...
@@ -1134,6 +1134,11 @@ export class Sequelize extends Hooks {
public
query
(
sql
:
string
|
{
query
:
string
;
values
:
unknown
[]
},
options
?:
QueryOptions
|
QueryOptionsWithType
<
QueryTypes
.
RAW
>
):
Promise
<
unknown
[]
>
;
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,
* Execute a query which would set an environment or user variable. The variables are set per connection,
* so this function needs a transaction.
* so this function needs a transaction.
*
*
...
...
types/test/sequelize.ts
View file @
dc41875
import
{
Config
,
Sequelize
,
Model
}
from
'sequelize'
;
import
{
Config
,
Sequelize
,
Model
}
from
'sequelize'
;
import
{
Fn
}
from
'../lib/utils'
;
Sequelize
.
useCLS
({
Sequelize
.
useCLS
({
});
});
...
@@ -46,4 +47,6 @@ Sequelize.afterConnect(() => {
...
@@ -46,4 +47,6 @@ Sequelize.afterConnect(() => {
});
});
const
rnd
:
Fn
=
sequelize
.
random
();
const
myModel
:
typeof
Model
=
sequelize
.
models
.
asd
;
const
myModel
:
typeof
Model
=
sequelize
.
models
.
asd
;
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment