MCPcopy
hub / github.com/sequelize/sequelize / random

Method random

src/sequelize.js:986–991  ·  view source on GitHub ↗

* Get the fn for random based on the dialect * * @returns {Sequelize.fn}

()

Source from the content-addressed store, hash-verified

984 * @returns {Sequelize.fn}
985 */
986 random() {
987 if (['postgres', 'sqlite', 'snowflake'].includes(this.getDialect())) {
988 return this.fn('RANDOM');
989 }
990 return this.fn('RAND');
991 }
992
993 /**
994 * Creates an object representing a database function. This can be used in search queries, both in where and order parts, and as default values in column definitions.

Callers 15

randFunction · 0.80
attachMSSQLUniqueIdFunction · 0.80
project.jsFile · 0.80
es6project.jsFile · 0.80
create.test.jsFile · 0.80
update.test.jsFile · 0.80
field.test.jsFile · 0.80

Calls 2

getDialectMethod · 0.95
fnMethod · 0.95

Tested by 1

attachMSSQLUniqueIdFunction · 0.64