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.
154 matches across 7 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packages/core/test/unit/utils/undot.test.ts | 342 | 'profile.addresses[0].street': '123 Main St', |
| LOW | packages/core/test/unit/utils/undot.test.ts | 356 | { street: '123 Main St', city: 'NYC' }, |
| LOW | …es/core/test/integration/associations/has-many.test.js | 1391 | username: 'John Doe', |
| LOW | …/core/test/integration/include/findAndCountAll.test.js | 61 | { name: 'Jane Doe', fk: 1 }, |
| LOW | …/core/test/integration/include/findAndCountAll.test.js | 62 | { name: 'John Doe', fk: 4 }, |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 288 | await vars.User.create({ name: 'John Doe', age: 21 }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 297 | await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 303 | const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 312 | expect(users[0].name).to.equal('John Doe'); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 319 | await User.create({ name: 'Jane Doe', age: 21 }, { transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 351 | await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction: t1 }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 355 | const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 362 | const johnDoe = await User.findOne({ where: { name: 'John Doe' } }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 378 | await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction: t1 }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 382 | const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 389 | const johnDoe = await User.findOne({ where: { name: 'John Doe' } }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 405 | const johnDoe = await User.findOne({ where: { name: 'John Doe' }, transaction: t1 }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 407 | expect(johnDoe.name).to.equal('John Doe'); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 413 | await User.update({ age: 22 }, { where: { name: 'John Doe' }, transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 417 | const johnDoe1 = await User.findOne({ where: { name: 'John Doe' }, transaction: t1 }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 419 | expect(johnDoe1.name).to.equal('John Doe'); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 457 | expect(users[0].name).to.equal('John Doe'); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 463 | await User.create({ name: 'Jane Doe', age: 21 }, { transaction }); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 469 | expect(users2[0].name).to.equal('John Doe'); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 471 | expect(users2[1].name).to.equal('Jane Doe'); |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 334 | await User.create({ name: 'Jane Doe', age: 21 }); // Create a User outside of the transaction |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 440 | await User.create({ name: 'Jane Doe', age: 21 }); // Create a User outside of the transaction |
| LOW | …es/core/test/integration/sequelize/transaction.test.ts | 493 | User.update({ age: 25 }, { where: { name: 'John Doe' } }).then(() => { |
| LOW | …ges/core/test/integration/dialects/mariadb/dao.test.js | 90 | email: 'foo@bar.com', |
| LOW | …ges/core/test/integration/dialects/mariadb/dao.test.js | 104 | email: 'foo@bar.com', |
| LOW | …ges/core/test/integration/dialects/mariadb/dao.test.js | 118 | const user0 = await User.create({ username: 'user', email: 'foo@bar.com', location: point }); |
| LOW | …e/test/integration/dialects/sqlite/dao-factory.test.js | 78 | name: 'John Doe', |
| LOW | …e/test/integration/dialects/sqlite/dao-factory.test.js | 96 | name: 'John Doe', |
| LOW | …e/test/integration/dialects/sqlite/dao-factory.test.js | 114 | name: 'John Doe', |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 543 | email: ['foo@bar.com', 'bar@baz.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 546 | expect(oldUser.email).to.contain.members(['foo@bar.com', 'bar@baz.com']); |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 552 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 606 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 626 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 639 | const data = { username: 'user', email: ['foo@bar.com'], settings: { test: '"value"' } }; |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 650 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 666 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 707 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 786 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 821 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 847 | const data = { username: 'user', email: ['foo@bar.com'], course_period }; |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 867 | const data = { username: 'user', email: ['foo@bar.com'], holidays }; |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 882 | await User.create({ username: 'user1', email: ['foo@bar.com'], course_period: periods[0] }); |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 907 | const user0 = await this.User.create({ username: 'user', email: ['foo@bar.com'] }); |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 924 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 936 | email: ['foo@bar.com'], |
| LOW | …es/core/test/integration/dialects/postgres/dao.test.js | 950 | const user0 = await User.create({ username: 'user', email: ['foo@bar.com'], location: point }); |
| LOW | packages/core/test/integration/model/upsert.test.js | 123 | await User.upsert({ name: 'John Doe' }); |
| LOW | packages/core/test/integration/model/create.test.js | 1160 | await User.create({ name: 'John Doe' }); |
| LOW | packages/core/test/integration/model/create.test.js | 1303 | const user = await User.create({ name: 'John Doe', options }); |
| LOW | packages/core/src/model.d.ts | 3344 | * @Default('John Doe') |
| LOW | packages/core/src/decorators/legacy/attribute.ts | 212 | * @Default('John Doe') |
| LOW | packages/cli/static/skeletons/seed.ts | 9 | * name: 'John Doe', |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packages/core/test/support.ts | 484 | function replaceGenericIdentifierQuotes(sql: string, dialect: AbstractDialect): string { |
| LOW | packages/core/test/support.ts | 616 | export function setIsIntegrationTestSuite(value: boolean): void { |
| LOW | packages/core/test/unit/utils/sql.test.ts | 1028 | function supportsNonStandardConformingStrings() { |
| LOW | packages/core/test/unit/utils/sql.test.ts | 1034 | function getNonStandardConfirmingStringDialect() { |
| LOW | packages/core/test/unit/sql/where.test.ts | 168 | function testSequelizeValueMethods( |
| LOW | packages/core/test/unit/sql/where.test.ts | 2703 | function describeAdjacentRangeSuite( |
| LOW | packages/core/test/integration/json.test.ts | 89 | before(async function checkOracleVersionForJSONSupport(this: Mocha.Context) { |
| LOW | packages/core/test/integration/support.ts | 92 | export function destroySequelizeAfterTest(sequelizeInstance: Sequelize): void { |
| LOW | packages/core/test/integration/support.ts | 360 | export async function isOracleJSONConstraintsSupported(): Promise<boolean> { |
| LOW | …es/core/test/integration/data-types/data-types.test.ts | 1705 | before(async function checkOracleVersionForJSONSupport(this: Mocha.Context) { |
| LOW | …ges/core/test/integration/data-types/geography.test.ts | 14 | async function createUserModelWithGeography(type?: GeoJsonType, srid?: number) { |
| LOW | …ages/core/test/integration/data-types/geometry.test.ts | 20 | async function createUserModelWithGeometry(type?: GeoJsonType) { |
| LOW | packages/core/src/sql-string.ts | 7 | export function getTextDataTypeForDialect(dialect: AbstractDialect): AbstractDataType<any> { |
| LOW | packages/core/src/geo-json.ts | 149 | export function assertIsGeoJsonLineString(value: unknown): asserts value is GeoJsonLineString { |
| LOW | packages/core/src/geo-json.ts | 199 | export function assertIsGeoJsonMultiPoint(value: unknown): asserts value is GeoJsonMultiPoint { |
| LOW | packages/core/src/geo-json.ts | 220 | export function assertIsGeoJsonMultiLineString( |
| LOW | packages/core/src/geo-json.ts | 251 | export function assertIsGeoJsonMultiPolygon(value: unknown): asserts value is GeoJsonMultiPolygon { |
| LOW | packages/core/src/geo-json.ts | 288 | export function assertIsGeoJsonGeometryCollection( |
| LOW | packages/core/src/model-internals.ts | 208 | export function getPrimaryKeyValueOrThrow(instance: Model, attributeName: string): unknown { |
| LOW | packages/core/src/transaction.ts | 602 | export function normalizeTransactionOptions( |
| LOW | packages/core/src/transaction.ts | 627 | export function assertTransactionIsCompatibleWithOptions( |
| LOW | packages/core/src/transaction.ts | 659 | function assertSupportedTransactionOptions( |
| LOW | packages/core/src/model-typescript.ts | 563 | function addAttributeGetterAndSetters(model: ModelStatic) { |
| LOW | …l-internals/get-belongs-to-associations-with-target.ts | 9 | export function getBelongsToAssociationsWithTarget(target: ModelStatic): BelongsToAssociation[] { |
| LOW | packages/core/src/associations/helpers.ts | 145 | function getAssociationsIncompatibilityStatus( |
| LOW | packages/core/src/associations/helpers.ts | 168 | export function assertAssociationModelIsDefined(model: ModelStatic<any>): void { |
| LOW | packages/core/src/decorators/legacy/decorator-utils.ts | 100 | export function throwMustBeStaticProperty( |
| LOW | packages/core/src/decorators/legacy/decorator-utils.ts | 120 | export function throwMustBeInstanceProperty( |
| LOW | …ages/core/src/decorators/legacy/built-in-attributes.ts | 12 | function createBuiltInAttributeDecorator( |
| LOW | packages/core/src/decorators/legacy/associations.ts | 128 | export function initDecoratedAssociations(source: ModelStatic, sequelize: Sequelize): void { |
| LOW | packages/core/src/decorators/shared/model.ts | 67 | export function registerModelAttributeOptions( |
| LOW | packages/core/src/decorators/shared/model.ts | 179 | function getRegisteredModelOptions(model: ModelStatic): ModelOptions { |
| LOW | packages/core/src/decorators/shared/model.ts | 203 | function getRegisteredAttributeOptions(model: ModelStatic): RegisteredAttributeOptions { |
| LOW | packages/core/src/utils/sql.ts | 28 | function mapBindParametersAndReplacements( |
| LOW | packages/core/src/utils/sql.ts | 290 | function escapeValueWithBackCompat( |
| LOW | packages/core/src/utils/sql.ts | 380 | export function createUnspecifiedOrderedBindCollector(token = '?'): BindCollector { |
| LOW | packages/core/src/utils/sql.ts | 402 | export function createSpecifiedOrderedBindCollector(prefix = '$'): BindCollector { |
| LOW | packages/core/src/utils/sql.ts | 427 | export function createNamedParamBindCollector(parameterPrefix: string): BindCollector { |
| LOW | packages/core/src/utils/sql.ts | 514 | export function formatMySqlStyleLimitOffset( |
| LOW | packages/core/src/utils/attribute-syntax.ts | 136 | function parseAttributeSyntaxInternal( |
| LOW | packages/core/src/utils/attribute-syntax.ts | 230 | function parseJsonPropertyKeyInternal(code: string): ParsedJsonPropertyKey { |
| LOW | packages/core/src/utils/format.ts | 121 | export function removeNullishValuesFromHash( |
| LOW | packages/core/src/utils/check.ts | 88 | export function buildInvalidOptionReceivedError( |
| LOW | packages/core/src/utils/undot.ts | 253 | export function transformRowWithPrecompiled( |
| LOW | packages/core/src/abstract-dialect/data-types-utils.ts | 61 | export function dataTypeClassOrInstanceToInstance(Type: DataTypeClassOrInstance): DataTypeInstance { |
| LOW | packages/core/src/abstract-dialect/query.ts | 158 | function getAttributeNameFromColumn(model: ModelStatic, columnOrAttribute: string): string { |
| LOW | packages/core/src/abstract-dialect/query.ts | 241 | function buildHashAttributeRowKeys( |
| LOW | packages/mariadb/src/_internal/data-types-db.ts | 12 | export function registerMariaDbDbDataTypeParsers(dialect: MariaDbDialect) { |
| LOW | …ckages/utils/src/common/parsers/parse-finite-number.ts | 7 | function parseFiniteNumberInternal(value: string | bigint): number | null { |
| LOW | …/src/common/comparators/localized-string-comparator.ts | 12 | export function localizedStringComparator( |
| LOW | packages/cli/src/api/get-umzug.ts | 38 | async function getUniversalUmzugMigrations(): Promise<Array<RunnableMigration<UmzugContext>>> { |
| LOW | packages/postgres/src/_internal/data-types-db.ts | 16 | export function registerPostgresDbDataTypeParsers(dialect: PostgresDialect) { |
| LOW | packages/postgres/src/_internal/data-types-overrides.ts | 18 | function removeUnsupportedIntegerOptions( |
| LOW | packages/sqlite3/src/_internal/data-types-overrides.ts | 6 | function removeUnsupportedIntegerOptions( |
| LOW | packages/sqlite3/src/_internal/data-types-overrides.ts | 18 | function removeUnsupportedDecimalNumberOptions( |
| LOW | packages/mysql/src/_internal/data-types-db.ts | 13 | export function registerMySqlDbDataTypeParsers(dialect: MySqlDialect) { |
| LOW | packages/db2/src/_internal/data-types-overrides.ts | 10 | function removeUnsupportedIntegerOptions( |
| LOW | packages/mssql/src/_internal/data-types-db.ts | 13 | export function registerMsSqlDbDataTypeParsers(dialect: MsSqlDialect) { |
| LOW | packages/mssql/src/_internal/data-types-overrides.ts | 7 | function removeUnsupportedIntegerOptions( |
| LOW | packages/ibmi/src/_internal/data-types-overrides.ts | 10 | function removeUnsupportedIntegerOptions( |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packages/core/test/unit/associations/has-many.test.ts | 161 | // TODO: remove this eslint-disable once we drop support for TypeScript <= 5.3 |
| LOW | packages/core/test/unit/decorators/associations.test.ts | 41 | expect(Profile.associations.user1.foreignKey).to.eq('userId'); |
| LOW | packages/core/test/unit/sql/literal.test.ts | 61 | }); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 101 | // }); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 121 | // this.Tasks.afterDestroy(afterTask); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 141 | // beforeProject = true; |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 281 | }); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 301 | // await this.Tasks.sync({ force: true }); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 321 | // expect(beforeTask).to.have.been.calledOnce; |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 341 | // throw new Error('Whoops!'); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 601 | // beforeEach(async function () { |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 621 | // it('with no errors', async function () { |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 641 | // this.Tasks.afterDestroy(async () => { |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 661 | // expect(afterProject).to.be.true; |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 681 | // afterProject = true; |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 701 | // try { |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 721 | // there is no way for Sequelize to call its beforeDestroy/afterDestroy |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 741 | // await this.sequelize.sync({ force: true }); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 761 | // beforeTask = true; |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 781 | // |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 801 | // let afterTask = false; |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 821 | // }); |
| LOW | …kages/core/test/integration/hooks/associations.test.js | 841 | // |
| LOW | packages/core/test/integration/model/findOne.test.js | 321 | |
| LOW | packages/core/src/model-repository.ts | 201 | throw new Error( |
| LOW | packages/oracle/src/query-generator.js | 701 | // A list that would have inbind positions like [:1, :2, :3...] to be used in generating sql string |
| LOW | packages/postgres/src/_internal/data-types-db.ts | 81 | |
| LOW | packages/sqlite3/src/query-generator.js | 81 | // each(options.uniqueKeys, (columns, indexName) => { |
| LOW | .github/workflows/ci.yml | 281 | - name: Extract artifact |
| LOW | .github/workflows/ci.yml | 301 | # node-version: ${{ matrix.node-version }} |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | packages/core/test/integration/sequelize/query.test.js | 512 | ).to.eventually.be.rejected.and.not.be.an.instanceOf(DatabaseError); |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packages/core/src/sequelize-typescript.ts | 944 | * If you really want to use the manual solution, don't forget to commit or rollback your transaction once you are don |
| LOW | packages/core/src/model.js | 160 | * @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.ts | 770 | * Don't forget to turn them back on, use {@link withoutForeignKeyChecks} to do this automatically. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | packages/mssql/src/query-generator.js | 564 | // definitions. Can be made more robust to support the |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | .github/workflows/authors.yml | 25 | - uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # Create a PR or update |