prisma-engines icon indicating copy to clipboard operation
prisma-engines copied to clipboard

Add the @comment attribute within the parsed Prisma Schema

Open StringKe opened this issue 3 years ago • 5 comments

Parse the @comment attribute (for SQL Comments or field comments).

model User {
          id        Int      @id @default(autoincrement())
          name      String?  @comment("This is a comment") // Parsing success
}

model User {
          id        Int      @id @default(autoincrement())
          name      String?  @comment(123) // Parsing error it is string.
}

model User {
          id        Int      @id @default(autoincrement())
          name      String?  @comment() // Parse error comment cannot be empty
}

I'm a Rust beginner and I'm not sure if there are other places where I need to add functionality for this attribute.

English is not my native language, so please forgive my grammatical errors.

StringKe avatar Mar 03 '22 10:03 StringKe

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 03 '22 10:03 CLAassistant

Hi @StringKe — thank you for the pull request, but adding anything to the Prisma Schema Language needs to go through a much longer process where we start with a design, consider all implications, arrive to a consensus, and only then implement. Moreover, we have to evaluate the feature relative to other work we also want to do. As a consequence, we do not merge direct pull requests to prisma-engines. We appreciate the effort and we'll try to make this policy clearer in a CONTRIBUTING.md, but this change would have to go through an issue in https://github.com/prisma/prisma first before we can accept a pull request.

tomhoule avatar Mar 04 '22 05:03 tomhoule

this is good idea

LiJoah avatar Oct 12 '22 03:10 LiJoah

Is there any updates on this PR? Is there any missing feature that we could commit in order to merge this PR? @tomhoule are you still in this project?

zC4sTr0 avatar Dec 21 '23 16:12 zC4sTr0

He is not, and we are currently not working on this feature, so also not looking at this PR. A first step to unblock this PR would obviously be to have a version of it without merge conflicts.

janpio avatar Jan 10 '24 01:01 janpio