Skip to content

SequelizeParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/parser-core/src/parsers/database/sequelize.parser.ts

Sequelize Parser implementation

Implements: IParser

Methods

MethodSignatureReturns
initializeinitialize(_config: ParserConfig)Promise<void>
canParsecanParse(filePath: string)boolean
parseFileparseFile(filePath: string, content: string)Promise<ParseResult>
parseFilesparseFiles(files: ParseFileInput[])Promise<ParseResult[]>
destroydestroy()Promise<void>

Properties

PropertyType
nameany
versionany
supportedPatternsany

Where it refuses work

  • SequelizeParser stops the work with an early return when args.length === 0, in 3 places.
  • SequelizeParser stops the work with an early return when !this.canParse(filePath).
  • SequelizeParser stops the work with an early return when !fileContent.trim().
  • SequelizeParser stops the work with an early return when tableNameMatch.
  • SequelizeParser stops the work with an early return when !allowNullDecorator.
  • SequelizeParser stops the work with an early return when arrowMatch.

When something fails

  • SequelizeParser handles failure in 3 places: it turns it into a return value in all 3.

Was this page helpful?

Download as PDF