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

Method random

lib/sequelize.js:904–909  ·  lib/sequelize.js::Sequelize.random

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

()

Source from the content-addressed store, hash-verified

902 * @returns {Sequelize.fn}
903 */
904 random() {
905 if ([class="st">'postgres', class="st">'sqlite', class="st">'snowflake'].includes(this.getDialect())) {
906 return this.fn(class="st">'RANDOM');
907 }
908 return this.fn(class="st">'RAND');
909 }
910
911 /**
912 * 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

sequelize.tsFile · 0.80
randFunction · 0.80
attachMSSQLUniqueIdFunction · 0.80
project.jsFile · 0.80
es6project.jsFile · 0.80
create.test.jsFile · 0.80
update.test.jsFile · 0.80

Calls 2

getDialectMethod · 0.95
fnMethod · 0.95

Tested by 1

attachMSSQLUniqueIdFunction · 0.64