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 93e64a9a
authored
Apr 16, 2019
by
Sushant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: index hints
1 parent
720f7ec9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
lib/dialects/abstract/query-generator.js
lib/index-hints.js
lib/sequelize.js
test/unit/dialects/mysql/query-generator.test.js
lib/dialects/abstract/query-generator.js
View file @
93e64a9
...
...
@@ -16,7 +16,7 @@ const BelongsToMany = require('../../associations/belongs-to-many');
const
HasMany
=
require
(
'../../associations/has-many'
);
const
Op
=
require
(
'../../operators'
);
const
sequelizeError
=
require
(
'../../errors'
);
const
{
IndexHints
}
=
require
(
'../../index-hints'
);
const
IndexHints
=
require
(
'../../index-hints'
);
const
QuoteHelper
=
require
(
'./query-generator/helpers/quote'
);
...
...
lib/index-hints.js
View file @
93e64a9
...
...
@@ -7,7 +7,7 @@
* @property FORCE
* @property IGNORE
*/
exports
.
IndexHin
ts
=
{
// eslint-disable-line
const
IndexHints
=
module
.
expor
ts
=
{
// eslint-disable-line
USE
:
'USE'
,
FORCE
:
'FORCE'
,
IGNORE
:
'IGNORE'
...
...
lib/sequelize.js
View file @
93e64a9
...
...
@@ -15,6 +15,7 @@ const QueryInterface = require('./query-interface');
const
Transaction
=
require
(
'./transaction'
);
const
QueryTypes
=
require
(
'./query-types'
);
const
TableHints
=
require
(
'./table-hints'
);
const
IndexHints
=
require
(
'./index-hints'
);
const
sequelizeErrors
=
require
(
'./errors'
);
const
Promise
=
require
(
'./promise'
);
const
Hooks
=
require
(
'./hooks'
);
...
...
@@ -1228,6 +1229,12 @@ Sequelize.Promise = Promise;
Sequelize
.
TableHints
=
TableHints
;
/**
* Available index hints to be used for querying data in mysql for index hints
* @see {@link IndexHints}
*/
Sequelize
.
IndexHints
=
IndexHints
;
/**
* A reference to the sequelize transaction class. Use this to access isolationLevels and types when creating a transaction
* @see {@link Transaction}
* @see {@link Sequelize.transaction}
...
...
test/unit/dialects/mysql/query-generator.test.js
View file @
93e64a9
...
...
@@ -6,7 +6,7 @@ const chai = require('chai'),
dialect
=
Support
.
getTestDialect
(),
_
=
require
(
'lodash'
),
Op
=
require
(
'../../../../lib/operators'
),
{
IndexHints
}
=
require
(
'../../../../lib/index-hints'
),
IndexHints
=
require
(
'../../../../lib/index-hints'
),
QueryGenerator
=
require
(
'../../../../lib/dialects/mysql/query-generator'
);
if
(
dialect
===
'mysql'
)
{
...
...
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