Repository Analysis

sequelize/sequelize

Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB, DB2 and DB2 for IBM i.

1.0 Likely human-written View on GitHub
1.0
Adjusted Score
1.0
Raw Score
100%
Time Factor
2026-05-28
Last Push
30,351
Stars
TypeScript
Language
178,910
Lines of Code
902
Files
154
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 2LOW 151

Pattern Findings

154 matches across 7 categories. Click a row to expand file-level details.

Fake / Example Data58 hits · 70 pts
SeverityFileLineSnippet
LOWpackages/core/test/unit/utils/undot.test.ts342 'profile.addresses[0].street': '123 Main St',
LOWpackages/core/test/unit/utils/undot.test.ts356 { street: '123 Main St', city: 'NYC' },
LOW…es/core/test/integration/associations/has-many.test.js1391 username: 'John Doe',
LOW…/core/test/integration/include/findAndCountAll.test.js61 { name: 'Jane Doe', fk: 1 },
LOW…/core/test/integration/include/findAndCountAll.test.js62 { name: 'John Doe', fk: 4 },
LOW…es/core/test/integration/sequelize/transaction.test.ts288 await vars.User.create({ name: 'John Doe', age: 21 });
LOW…es/core/test/integration/sequelize/transaction.test.ts297 await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts303 const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts312 expect(users[0].name).to.equal('John Doe');
LOW…es/core/test/integration/sequelize/transaction.test.ts319 await User.create({ name: 'Jane Doe', age: 21 }, { transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts351 await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction: t1 });
LOW…es/core/test/integration/sequelize/transaction.test.ts355 const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts362 const johnDoe = await User.findOne({ where: { name: 'John Doe' } });
LOW…es/core/test/integration/sequelize/transaction.test.ts378 await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction: t1 });
LOW…es/core/test/integration/sequelize/transaction.test.ts382 const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts389 const johnDoe = await User.findOne({ where: { name: 'John Doe' } });
LOW…es/core/test/integration/sequelize/transaction.test.ts405 const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction: t1 });
LOW…es/core/test/integration/sequelize/transaction.test.ts407 expect(johnDoe.name).to.equal('John Doe');
LOW…es/core/test/integration/sequelize/transaction.test.ts413 await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts417 const johnDoe1 = await User.findOne({ where: { name: 'John Doe' }, transaction: t1 });
LOW…es/core/test/integration/sequelize/transaction.test.ts419 expect(johnDoe1.name).to.equal('John Doe');
LOW…es/core/test/integration/sequelize/transaction.test.ts457 expect(users[0].name).to.equal('John Doe');
LOW…es/core/test/integration/sequelize/transaction.test.ts463 await User.create({ name: 'Jane Doe', age: 21 }, { transaction });
LOW…es/core/test/integration/sequelize/transaction.test.ts469 expect(users2[0].name).to.equal('John Doe');
LOW…es/core/test/integration/sequelize/transaction.test.ts471 expect(users2[1].name).to.equal('Jane Doe');
LOW…es/core/test/integration/sequelize/transaction.test.ts334 await User.create({ name: 'Jane Doe', age: 21 }); // Create a User outside of the transaction
LOW…es/core/test/integration/sequelize/transaction.test.ts440 await User.create({ name: 'Jane Doe', age: 21 }); // Create a User outside of the transaction
LOW…es/core/test/integration/sequelize/transaction.test.ts493 User.update({ age: 25 }, { where: { name: 'John Doe' } }).then(() => {
LOW…ges/core/test/integration/dialects/mariadb/dao.test.js90 email: 'foo@bar.com',
LOW…ges/core/test/integration/dialects/mariadb/dao.test.js104 email: 'foo@bar.com',
LOW…ges/core/test/integration/dialects/mariadb/dao.test.js118 const user0 = await User.create({ username: 'user', email: 'foo@bar.com', location: point });
LOW…e/test/integration/dialects/sqlite/dao-factory.test.js78 name: 'John Doe',
LOW…e/test/integration/dialects/sqlite/dao-factory.test.js96 name: 'John Doe',
LOW…e/test/integration/dialects/sqlite/dao-factory.test.js114 name: 'John Doe',
LOW…es/core/test/integration/dialects/postgres/dao.test.js543 email: ['foo@bar.com', 'bar@baz.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js546 expect(oldUser.email).to.contain.members(['foo@bar.com', 'bar@baz.com']);
LOW…es/core/test/integration/dialects/postgres/dao.test.js552 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js606 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js626 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js639 const data = { username: 'user', email: ['foo@bar.com'], settings: { test: '"value"' } };
LOW…es/core/test/integration/dialects/postgres/dao.test.js650 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js666 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js707 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js786 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js821 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js847 const data = { username: 'user', email: ['foo@bar.com'], course_period };
LOW…es/core/test/integration/dialects/postgres/dao.test.js867 const data = { username: 'user', email: ['foo@bar.com'], holidays };
LOW…es/core/test/integration/dialects/postgres/dao.test.js882 await User.create({ username: 'user1', email: ['foo@bar.com'], course_period: periods[0] });
LOW…es/core/test/integration/dialects/postgres/dao.test.js907 const user0 = await this.User.create({ username: 'user', email: ['foo@bar.com'] });
LOW…es/core/test/integration/dialects/postgres/dao.test.js924 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js936 email: ['foo@bar.com'],
LOW…es/core/test/integration/dialects/postgres/dao.test.js950 const user0 = await User.create({ username: 'user', email: ['foo@bar.com'], location: point });
LOWpackages/core/test/integration/model/upsert.test.js123 await User.upsert({ name: 'John Doe' });
LOWpackages/core/test/integration/model/create.test.js1160 await User.create({ name: 'John Doe' });
LOWpackages/core/test/integration/model/create.test.js1303 const user = await User.create({ name: 'John Doe', options });
LOWpackages/core/src/model.d.ts3344 * @Default('John Doe')
LOWpackages/core/src/decorators/legacy/attribute.ts212 * @Default('John Doe')
LOWpackages/cli/static/skeletons/seed.ts9 * name: 'John Doe',
Hyper-Verbose Identifiers60 hits · 60 pts
SeverityFileLineSnippet
LOWpackages/core/test/support.ts484function replaceGenericIdentifierQuotes(sql: string, dialect: AbstractDialect): string {
LOWpackages/core/test/support.ts616export function setIsIntegrationTestSuite(value: boolean): void {
LOWpackages/core/test/unit/utils/sql.test.ts1028function supportsNonStandardConformingStrings() {
LOWpackages/core/test/unit/utils/sql.test.ts1034function getNonStandardConfirmingStringDialect() {
LOWpackages/core/test/unit/sql/where.test.ts168 function testSequelizeValueMethods(
LOWpackages/core/test/unit/sql/where.test.ts2703 function describeAdjacentRangeSuite(
LOWpackages/core/test/integration/json.test.ts89 before(async function checkOracleVersionForJSONSupport(this: Mocha.Context) {
LOWpackages/core/test/integration/support.ts92export function destroySequelizeAfterTest(sequelizeInstance: Sequelize): void {
LOWpackages/core/test/integration/support.ts360export async function isOracleJSONConstraintsSupported(): Promise<boolean> {
LOW…es/core/test/integration/data-types/data-types.test.ts1705 before(async function checkOracleVersionForJSONSupport(this: Mocha.Context) {
LOW…ges/core/test/integration/data-types/geography.test.ts14async function createUserModelWithGeography(type?: GeoJsonType, srid?: number) {
LOW…ages/core/test/integration/data-types/geometry.test.ts20async function createUserModelWithGeometry(type?: GeoJsonType) {
LOWpackages/core/src/sql-string.ts7export function getTextDataTypeForDialect(dialect: AbstractDialect): AbstractDataType<any> {
LOWpackages/core/src/geo-json.ts149export function assertIsGeoJsonLineString(value: unknown): asserts value is GeoJsonLineString {
LOWpackages/core/src/geo-json.ts199export function assertIsGeoJsonMultiPoint(value: unknown): asserts value is GeoJsonMultiPoint {
LOWpackages/core/src/geo-json.ts220export function assertIsGeoJsonMultiLineString(
LOWpackages/core/src/geo-json.ts251export function assertIsGeoJsonMultiPolygon(value: unknown): asserts value is GeoJsonMultiPolygon {
LOWpackages/core/src/geo-json.ts288export function assertIsGeoJsonGeometryCollection(
LOWpackages/core/src/model-internals.ts208export function getPrimaryKeyValueOrThrow(instance: Model, attributeName: string): unknown {
LOWpackages/core/src/transaction.ts602export function normalizeTransactionOptions(
LOWpackages/core/src/transaction.ts627export function assertTransactionIsCompatibleWithOptions(
LOWpackages/core/src/transaction.ts659function assertSupportedTransactionOptions(
LOWpackages/core/src/model-typescript.ts563function addAttributeGetterAndSetters(model: ModelStatic) {
LOW…l-internals/get-belongs-to-associations-with-target.ts9export function getBelongsToAssociationsWithTarget(target: ModelStatic): BelongsToAssociation[] {
LOWpackages/core/src/associations/helpers.ts145function getAssociationsIncompatibilityStatus(
LOWpackages/core/src/associations/helpers.ts168export function assertAssociationModelIsDefined(model: ModelStatic<any>): void {
LOWpackages/core/src/decorators/legacy/decorator-utils.ts100export function throwMustBeStaticProperty(
LOWpackages/core/src/decorators/legacy/decorator-utils.ts120export function throwMustBeInstanceProperty(
LOW…ages/core/src/decorators/legacy/built-in-attributes.ts12function createBuiltInAttributeDecorator(
LOWpackages/core/src/decorators/legacy/associations.ts128export function initDecoratedAssociations(source: ModelStatic, sequelize: Sequelize): void {
LOWpackages/core/src/decorators/shared/model.ts67export function registerModelAttributeOptions(
LOWpackages/core/src/decorators/shared/model.ts179function getRegisteredModelOptions(model: ModelStatic): ModelOptions {
LOWpackages/core/src/decorators/shared/model.ts203function getRegisteredAttributeOptions(model: ModelStatic): RegisteredAttributeOptions {
LOWpackages/core/src/utils/sql.ts28function mapBindParametersAndReplacements(
LOWpackages/core/src/utils/sql.ts290function escapeValueWithBackCompat(
LOWpackages/core/src/utils/sql.ts380export function createUnspecifiedOrderedBindCollector(token = '?'): BindCollector {
LOWpackages/core/src/utils/sql.ts402export function createSpecifiedOrderedBindCollector(prefix = '$'): BindCollector {
LOWpackages/core/src/utils/sql.ts427export function createNamedParamBindCollector(parameterPrefix: string): BindCollector {
LOWpackages/core/src/utils/sql.ts514export function formatMySqlStyleLimitOffset(
LOWpackages/core/src/utils/attribute-syntax.ts136function parseAttributeSyntaxInternal(
LOWpackages/core/src/utils/attribute-syntax.ts230function parseJsonPropertyKeyInternal(code: string): ParsedJsonPropertyKey {
LOWpackages/core/src/utils/format.ts121export function removeNullishValuesFromHash(
LOWpackages/core/src/utils/check.ts88export function buildInvalidOptionReceivedError(
LOWpackages/core/src/utils/undot.ts253export function transformRowWithPrecompiled(
LOWpackages/core/src/abstract-dialect/data-types-utils.ts61export function dataTypeClassOrInstanceToInstance(Type: DataTypeClassOrInstance): DataTypeInstance {
LOWpackages/core/src/abstract-dialect/query.ts158function getAttributeNameFromColumn(model: ModelStatic, columnOrAttribute: string): string {
LOWpackages/core/src/abstract-dialect/query.ts241function buildHashAttributeRowKeys(
LOWpackages/mariadb/src/_internal/data-types-db.ts12export function registerMariaDbDbDataTypeParsers(dialect: MariaDbDialect) {
LOW…ckages/utils/src/common/parsers/parse-finite-number.ts7function parseFiniteNumberInternal(value: string | bigint): number | null {
LOW…/src/common/comparators/localized-string-comparator.ts12export function localizedStringComparator(
LOWpackages/cli/src/api/get-umzug.ts38async function getUniversalUmzugMigrations(): Promise<Array<RunnableMigration<UmzugContext>>> {
LOWpackages/postgres/src/_internal/data-types-db.ts16export function registerPostgresDbDataTypeParsers(dialect: PostgresDialect) {
LOWpackages/postgres/src/_internal/data-types-overrides.ts18function removeUnsupportedIntegerOptions(
LOWpackages/sqlite3/src/_internal/data-types-overrides.ts6function removeUnsupportedIntegerOptions(
LOWpackages/sqlite3/src/_internal/data-types-overrides.ts18function removeUnsupportedDecimalNumberOptions(
LOWpackages/mysql/src/_internal/data-types-db.ts13export function registerMySqlDbDataTypeParsers(dialect: MySqlDialect) {
LOWpackages/db2/src/_internal/data-types-overrides.ts10function removeUnsupportedIntegerOptions(
LOWpackages/mssql/src/_internal/data-types-db.ts13export function registerMsSqlDbDataTypeParsers(dialect: MsSqlDialect) {
LOWpackages/mssql/src/_internal/data-types-overrides.ts7function removeUnsupportedIntegerOptions(
LOWpackages/ibmi/src/_internal/data-types-overrides.ts10function removeUnsupportedIntegerOptions(
Over-Commented Block30 hits · 30 pts
SeverityFileLineSnippet
LOWpackages/core/test/unit/associations/has-many.test.ts161 // TODO: remove this eslint-disable once we drop support for TypeScript <= 5.3
LOWpackages/core/test/unit/decorators/associations.test.ts41 expect(Profile.associations.user1.foreignKey).to.eq('userId');
LOWpackages/core/test/unit/sql/literal.test.ts61 });
LOW…kages/core/test/integration/hooks/associations.test.js101 // });
LOW…kages/core/test/integration/hooks/associations.test.js121 // this.Tasks.afterDestroy(afterTask);
LOW…kages/core/test/integration/hooks/associations.test.js141 // beforeProject = true;
LOW…kages/core/test/integration/hooks/associations.test.js281 });
LOW…kages/core/test/integration/hooks/associations.test.js301 // await this.Tasks.sync({ force: true });
LOW…kages/core/test/integration/hooks/associations.test.js321 // expect(beforeTask).to.have.been.calledOnce;
LOW…kages/core/test/integration/hooks/associations.test.js341 // throw new Error('Whoops!');
LOW…kages/core/test/integration/hooks/associations.test.js601 // beforeEach(async function () {
LOW…kages/core/test/integration/hooks/associations.test.js621 // it('with no errors', async function () {
LOW…kages/core/test/integration/hooks/associations.test.js641 // this.Tasks.afterDestroy(async () => {
LOW…kages/core/test/integration/hooks/associations.test.js661 // expect(afterProject).to.be.true;
LOW…kages/core/test/integration/hooks/associations.test.js681 // afterProject = true;
LOW…kages/core/test/integration/hooks/associations.test.js701 // try {
LOW…kages/core/test/integration/hooks/associations.test.js721 // there is no way for Sequelize to call its beforeDestroy/afterDestroy
LOW…kages/core/test/integration/hooks/associations.test.js741 // await this.sequelize.sync({ force: true });
LOW…kages/core/test/integration/hooks/associations.test.js761 // beforeTask = true;
LOW…kages/core/test/integration/hooks/associations.test.js781 //
LOW…kages/core/test/integration/hooks/associations.test.js801 // let afterTask = false;
LOW…kages/core/test/integration/hooks/associations.test.js821 // });
LOW…kages/core/test/integration/hooks/associations.test.js841 //
LOWpackages/core/test/integration/model/findOne.test.js321
LOWpackages/core/src/model-repository.ts201 throw new Error(
LOWpackages/oracle/src/query-generator.js701 // A list that would have inbind positions like [:1, :2, :3...] to be used in generating sql string
LOWpackages/postgres/src/_internal/data-types-db.ts81
LOWpackages/sqlite3/src/query-generator.js81 // each(options.uniqueKeys, (columns, indexName) => {
LOW.github/workflows/ci.yml281 - name: Extract artifact
LOW.github/workflows/ci.yml301 # node-version: ${{ matrix.node-version }}
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALpackages/core/test/integration/sequelize/query.test.js512 ).to.eventually.be.rejected.and.not.be.an.instanceOf(DatabaseError);
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippet
LOWpackages/core/src/sequelize-typescript.ts944 * If you really want to use the manual solution, don't forget to commit or rollback your transaction once you are don
LOWpackages/core/src/model.js160 * @param {symbol} secret Secret used to ensure Model.build is used instead of new Model(). Don't forget to pass it u
LOW…ore/src/abstract-dialect/query-interface-typescript.ts770 * Don't forget to turn them back on, use {@link withoutForeignKeyChecks} to do this automatically.
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMpackages/mssql/src/query-generator.js564 // definitions. Can be made more robust to support the
Self-Referential Comments1 hit · 2 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/authors.yml25 - uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # Create a PR or update