aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/prisma/test.prisma
diff options
context:
space:
mode:
authorelianiva <dicha.arkana03@gmail.com>2021-11-26 21:14:24 +0700
committerStephan Seitz <stephan.seitz@fau.de>2021-11-28 00:36:24 +0100
commite64fe530cdb067e78efd4a7ffa1c009b245d274b (patch)
treef65134d923ce8e261596d5a03550c9d873284eed /tests/query/highlights/prisma/test.prisma
parentfix(prisma): propert @type highlighting (diff)
downloadnvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.tar
nvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.tar.gz
nvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.tar.bz2
nvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.tar.lz
nvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.tar.xz
nvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.tar.zst
nvim-treesitter-e64fe530cdb067e78efd4a7ffa1c009b245d274b.zip
test(prisma): add initial test
Diffstat (limited to 'tests/query/highlights/prisma/test.prisma')
-rw-r--r--tests/query/highlights/prisma/test.prisma56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/query/highlights/prisma/test.prisma b/tests/query/highlights/prisma/test.prisma
new file mode 100644
index 000000000..9e185cfb5
--- /dev/null
+++ b/tests/query/highlights/prisma/test.prisma
@@ -0,0 +1,56 @@
+generator client {
+// ^ keyword
+ provider = "go run github.com/prisma/prisma-client-go"
+ // ^ variable
+}
+
+datasource db {
+ provider = "postgresql"
+ // ^ string
+ url = env("DATABASE_URL")
+ // ^ function
+}
+
+model User {
+ email String
+ // ^ type
+ username String @id
+ // ^ operator
+ password String
+ fullName String @map("full_name")
+ // ^ function
+ avatarUrl String @map("avatar_url")
+ about String?
+ // ^ type
+ createdAt DateTime @default(now()) @map("created_at")
+ updatedAt DateTime @updatedAt @map("updated_at")
+
+ @@map("user")
+}
+
+model Reaction {
+ // ^ punctuation.bracket
+ id Int @id @default(autoincrement())
+ // ^ punctuation.bracket
+ postId Int @map("post_id")
+ userId String @map("user_id")
+ type ReactionType
+ createdAt DateTime @default(now()) @map("created_at")
+ updatedAt DateTime @updatedAt @map("updated_at")
+
+ post Post @relation(fields: [postId], references: [id])
+ // ^ property
+ user User @relation(fields: [userId], references: [username])
+ // ^ punctuation.bracket
+
+ @@map("reaction")
+}
+
+enum ReactionType {
+// ^ keyword
+ LIKE
+ HAHA
+ SAD
+ ANGRY
+ // ^ constant
+}