Kind: Class
Source: atloria-monorepo/libs/parser-core/src/parsers/database/prisma.parser.ts
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
PrismaParserstops the work with an early return whenfield.isList, in 2 places.PrismaParserstops the work with an early return when!this.canParse(filePath).PrismaParserstops the work with an early return when!fileContent.trim().PrismaParserstops the work with an early return whenvalue === 'true' || value === 'false'.PrismaParserstops the work with an early return when/^\d+$/.test(value).PrismaParserstops the work with an early return when/^\d+\.\d+$/.test(value).
When something fails
PrismaParserhandles failure in 2 places: it turns it into a return value in all 2.
Was this page helpful?