Introduces abstractions over schema files that in future would allow us to support multiple schemas files.
At the moment, this does not yet means Language tools support split schema - we are still working with a single files in there.
Abstractions I am talking about:
SchemaDocument - single .prisma document, part of the schema. Can be created either from TextDocument supplied by language tools or file read from the disk.
Line - slightly nicer abstraction over single line of text, main point of it's existence - pointer back to SchemaDocument that contains it.
PrismaSchema - collection of schema documents comprising a single DB schema. Allows to iterate over lines of all of the contained files. For the most parts, this replaces lines: string[] array as an input of various language tools operations.
Block got a pointer back to the containing documents. Renames and jumps to definition are aware that their target might not be the same file they started in and adjusted accordingly.
Introduces abstractions over schema files that in future would allow us to support multiple schemas files. At the moment, this does not yet means Language tools support split schema - we are still working with a single files in there.
Abstractions I am talking about:
SchemaDocument
- single.prisma
document, part of the schema. Can be created either fromTextDocument
supplied by language tools or file read from the disk.Line
- slightly nicer abstraction over single line of text, main point of it's existence - pointer back toSchemaDocument
that contains it.PrismaSchema
- collection of schema documents comprising a single DB schema. Allows to iterate over lines of all of the contained files. For the most parts, this replaceslines: string[]
array as an input of various language tools operations.Block
got a pointer back to the containing documents. Renames and jumps to definition are aware that their target might not be the same file they started in and adjusted accordingly.Close prisma/team-orm#1126