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

Commit 93e64a9a by Sushant

docs: index hints

1 parent 720f7ec9
......@@ -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');
......
......@@ -7,7 +7,7 @@
* @property FORCE
* @property IGNORE
*/
exports.IndexHints = { // eslint-disable-line
const IndexHints = module.exports = { // eslint-disable-line
USE: 'USE',
FORCE: 'FORCE',
IGNORE: 'IGNORE'
......
......@@ -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}
......
......@@ -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') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!