# PrismaParser

**Kind:** Class

**Source:** [`atloria-monorepo/libs/parser-core/src/parsers/database/prisma.parser.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/parsers/database/prisma.parser.ts#L74)

Prisma Parser implementation

**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

- `PrismaParser` stops the work with an early return when `field.isList`, in 2 places.
- `PrismaParser` stops the work with an early return when `!this.canParse(filePath)`.
- `PrismaParser` stops the work with an early return when `!fileContent.trim()`.
- `PrismaParser` stops the work with an early return when `value === 'true' || value === 'false'`.
- `PrismaParser` stops the work with an early return when `/^\d+$/.test(value)`.
- `PrismaParser` stops the work with an early return when `/^\d+\.\d+$/.test(value)`.

## When something fails

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