From 9a7487af631575a9280ab62d7ce5db02216a9818 Mon Sep 17 00:00:00 2001 From: geket Date: Wed, 26 Nov 2025 05:39:46 -0500 Subject: [PATCH 1/4] feat: Prisma Schema Language (PSL) user-defined language --- UDLs/prisma.xml | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 UDLs/prisma.xml diff --git a/UDLs/prisma.xml b/UDLs/prisma.xml new file mode 100644 index 0000000..549ce0c --- /dev/null +++ b/UDLs/prisma.xml @@ -0,0 +1,64 @@ + + + + + + + + 00// 01 02 03/* 04*/ + + + + + + + + ( ) [ ] , ? : = + + { + + } + + + + + + + model enum datasource generator type view + String Int Float Boolean DateTime Json Bytes Decimal BigInt Unsupported + @id @default @unique @relation @map @updatedAt @ignore @db + @@id @@unique @@index @@map @@ignore @@schema @@shardKey @@fulltext + autoincrement cuid uuid ulid nanoid now auto dbgenerated sequence env true false null + provider url output previewFeatures engineType binaryTargets fields references onDelete onUpdate name shadowDatabaseUrl directUrl relationMode extensions runtime moduleFormat generatedFileExtension importFileExtension + postgresql mysql sqlite sqlserver mongodb cockroachdb Cascade Restrict NoAction SetNull SetDefault Asc Desc + prisma-client-js prisma-client native library binary cjs esm foreignKeys prisma ObjectId Uuid Text VarChar Char SmallInt Double Date Time Timestamp JsonB ByteA + 00" 01\ 02" 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From bf7a14b4aa6e4086fa2901a3c14148d6c0c7eb33 Mon Sep 17 00:00:00 2001 From: geket Date: Wed, 26 Nov 2025 06:02:05 -0500 Subject: [PATCH 2/4] feat: Prisma Schema Language (PSL) user-defined language --- UDL-samples/Prisma_PSL_byGeket.prisma | 56 +++++++++++++++++++++++++++ udl-list.json | 9 +++++ udl-list.md | 1 + 3 files changed, 66 insertions(+) create mode 100644 UDL-samples/Prisma_PSL_byGeket.prisma diff --git a/UDL-samples/Prisma_PSL_byGeket.prisma b/UDL-samples/Prisma_PSL_byGeket.prisma new file mode 100644 index 0000000..4802d80 --- /dev/null +++ b/UDL-samples/Prisma_PSL_byGeket.prisma @@ -0,0 +1,56 @@ +// This is the Prisma schema file for a blog application +// https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model User { + id Int @id @default(autoincrement()) + email String @unique + name String? + posts Post[] + profile Profile? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model Profile { + id Int @id @default(autoincrement()) + bio String? + user User @relation(fields: [userId], references: [id]) + userId Int @unique +} + +model Post { + id Int @id @default(autoincrement()) + title String + content String? + published Boolean @default(false) + author User @relation(fields: [authorId], references: [id]) + authorId Int + categories Category[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([authorId]) +} + +model Category { + id Int @id @default(autoincrement()) + name String @unique + posts Post[] + + @@map("categories") +} + +enum Role { + USER + ADMIN + MODERATOR +} \ No newline at end of file diff --git a/udl-list.json b/udl-list.json index 4ce4b3d..26c3b46 100644 --- a/udl-list.json +++ b/udl-list.json @@ -2570,6 +2570,15 @@ "autoCompletion": "Practical Programming Language (PPL)", "autoCompletionAuthor": "generate_ac.py" }, + { + "id-name": "Prisma_PSL_byGeket", + "display-name": "Prisma Schema Language (PSL)", + "version": "Wed, 26 Nov 2025 8:00:00 GMT", + "sample": "Prisma_PSL_byGeket.prisma", + "repository": "", + "description": "Prisma Schema Language (PSL) syntax highlighting for Prisma ORM schema files", + "author": "Jones" + }, { "id-name": "PROC_V1_byArmandoHerrazDurango", "display-name": "Oracle PRO-C", diff --git a/udl-list.md b/udl-list.md index 490d0c0..946ad95 100644 --- a/udl-list.md +++ b/udl-list.md @@ -264,6 +264,7 @@ | [Powerpro](./UDLs/Powerpro_byBrotherGabriel-Marie.xml) | [Brother Gabriel-Marie](mailto:brgabriel@sspx.com) | Powerpro | | [Powershell](./UDLs/Powershell_by-jongalloway.xml) | [jongalloway](mailto:jongalloway@users.sourceforge.net) | Powershell | | [Practical Programming Language (PPL)](./UDLs/PPL_byOscarHenryTejera.xml) | [Oscar Henry Tejera](mailto:henrytejera@gmail.com) | Practical Programming Language (PPL) | +| [Prisma Schema Language](./UDLs/Prisma_byJones.xml) | Jones | Prisma Schema Language (PSL) syntax highlighting for Prisma ORM schema files | | [Progress4GL](./UDLs/Progress4GL_by-jefb.xml) | [jefb](mailto:jefb@users.sourceforge.net) | Progress4GL | | [Prolog (GNU)](./UDLs/Prolog-GNU_byDanielDiaz.xml) | [Daniel Diaz](mailto:Daniel.Diaz@univ-paris1.fr) | Prolog (GNU) | | [Prolog (SWI)](./UDLs/Prolog-SWI_byAnthonyBonnier.xml) | [Anthony Bonnier](mailto:anthonybonnier@gmail.com) | Prolog (SWI) | From b612b31317b7ffa39fc621ed37b71beb7b2b72d1 Mon Sep 17 00:00:00 2001 From: geket Date: Wed, 26 Nov 2025 06:05:21 -0500 Subject: [PATCH 3/4] fix: filename convention --- UDLs/{prisma.xml => Prisma_PSL_byGeket.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename UDLs/{prisma.xml => Prisma_PSL_byGeket.xml} (100%) diff --git a/UDLs/prisma.xml b/UDLs/Prisma_PSL_byGeket.xml similarity index 100% rename from UDLs/prisma.xml rename to UDLs/Prisma_PSL_byGeket.xml From 961a06d54bbae75e0614f3d60c068f52006d27b4 Mon Sep 17 00:00:00 2001 From: PeterCJ Date: Wed, 26 Nov 2025 06:13:49 -0800 Subject: [PATCH 4/4] Fix Prisma UDL: -> --- UDLs/Prisma_PSL_byGeket.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UDLs/Prisma_PSL_byGeket.xml b/UDLs/Prisma_PSL_byGeket.xml index 549ce0c..a98ca55 100644 --- a/UDLs/Prisma_PSL_byGeket.xml +++ b/UDLs/Prisma_PSL_byGeket.xml @@ -53,7 +53,7 @@ - +