# SequelizeParser

**Kind:** Class

**Source:** [`atloria-monorepo/apps/database-parser/src/parsers/sequelize.parser.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/database-parser/src/parsers/sequelize.parser.ts#L25)

**Implements:** `IParser`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `initialize` | `initialize(config: ParserConfig)` | `Promise<void>` |
| `canParse` | `canParse(filePath: string)` | `boolean` |
| `parseFile` | `parseFile(filePath: string, content: string)` | `Promise<ParseResult>` |
| `parseFiles` | `parseFiles(files: ParseFileInput[])` | `Promise<ParseResult[]>` |
| `destroy` | `destroy()` | `Promise<void>` |

## Properties

| Property | Type |
|---|---|
| `name` | `any` |
| `version` | `any` |
| `supportedPatterns` | `any` |

## Where it refuses work

- `SequelizeParser` stops the work with an early return when `args.length === 0`, in 5 places.
- `SequelizeParser` stops the work with an early return when `!this.canParse(filePath)`.
- `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 `!defaultDecorator`.
- `SequelizeParser` stops the work with an early return when `text.startsWith('"') || text.startsWith("'")`.

## When something fails

- `SequelizeParser` handles failure in 2 places: it turns it into a return value in all 2.
