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 5412adea
authored
Apr 26, 2019
by
Simon Schick
Committed by
GitHub
Apr 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(typings): types for addIndex (#10844)
1 parent
8d1972f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
types/lib/query-interface.d.ts
types/test/query-interface.ts
types/lib/query-interface.d.ts
View file @
5412ade
...
@@ -124,16 +124,16 @@ export interface QueryInterfaceDropAllTablesOptions extends QueryInterfaceOption
...
@@ -124,16 +124,16 @@ export interface QueryInterfaceDropAllTablesOptions extends QueryInterfaceOption
}
}
export
interface
QueryInterfaceIndexOptions
extends
QueryInterfaceOptions
{
export
interface
QueryInterfaceIndexOptions
extends
QueryInterfaceOptions
{
indicesT
ype
?:
'UNIQUE'
|
'FULLTEXT'
|
'SPATIAL'
;
t
ype
?:
'UNIQUE'
|
'FULLTEXT'
|
'SPATIAL'
;
/** The name of the index. Default is __ */
/** The name of the index. Default is __ */
indexN
ame
?:
string
;
n
ame
?:
string
;
/** For FULLTEXT columns set your parser */
/** For FULLTEXT columns set your parser */
parser
?:
string
;
parser
?:
string
;
/** Set a type for the index, e.g. BTREE. See the documentation of the used dialect */
/** Set a type for the index, e.g. BTREE. See the documentation of the used dialect */
indexType
?:
string
;
using
?:
string
;
}
}
export
interface
AddUniqueConstraintOptions
{
export
interface
AddUniqueConstraintOptions
{
...
...
types/test/query-interface.ts
View file @
5412ade
...
@@ -132,8 +132,8 @@ queryInterface.addIndex('Person', ['firstname', 'lastname']);
...
@@ -132,8 +132,8 @@ queryInterface.addIndex('Person', ['firstname', 'lastname']);
// - indexType: Set a type for the index, e.g. BTREE. See the documentation of the used dialect
// - indexType: Set a type for the index, e.g. BTREE. See the documentation of the used dialect
// - logging: A function that receives the sql query, e.g. console.log
// - logging: A function that receives the sql query, e.g. console.log
queryInterface
.
addIndex
(
'Person'
,
[
'firstname'
,
'lastname'
],
{
queryInterface
.
addIndex
(
'Person'
,
[
'firstname'
,
'lastname'
],
{
indexN
ame
:
'SuperDuperIndex'
,
n
ame
:
'SuperDuperIndex'
,
indicesT
ype
:
'UNIQUE'
,
t
ype
:
'UNIQUE'
,
});
});
queryInterface
.
removeIndex
(
'Person'
,
'SuperDuperIndex'
);
queryInterface
.
removeIndex
(
'Person'
,
'SuperDuperIndex'
);
...
...
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