{"_id":"@algochad/prisma-core","_rev":"37-f779fbd3045ca8b93732de85a8038d71","name":"@algochad/prisma-core","dist-tags":{"latest":"1.2.3"},"versions":{"1.1.17":{"name":"@algochad/prisma-core","version":"1.1.17","keywords":["nestjs","prisma","library","ef-core","query-builder","database","orm","linq","csharp"],"author":{"name":"Your Name"},"license":"MIT","_id":"@algochad/prisma-core@1.1.17","maintainers":[{"name":"algochad","email":"givillamor01@gmail.com"}],"dist":{"shasum":"ecca32eed7d08ec6e1008577e3435a4d56d0949e","tarball":"https://registry.npmjs.org/@algochad/prisma-core/-/prisma-core-1.1.17.tgz","fileCount":84,"integrity":"sha512-zrPf+1W1s5d6TxTzUMG2fJJEIvHWV71nrrBJsDJoqCtZ2QQ7j4TUSCPlmeDkQHJqvDqs8SVX31qgciGOrcfe/Q==","signatures":[{"sig":"MEUCIQC18icztNeUQCTaizHlhv0ZDRSxwqhvu/10oUpkR0yAqwIgAU81VyU++liaDrekDRBTlRQ1BPrAPAgBrGmlioFlN1M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":570147},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e0c9d85b77342a0ae18a1bcaecc707e8cdb742ed","scripts":{"test":"jest","build":"tsc -p tsconfig.lib.json"},"_npmUser":{"name":"algochad","email":"givillamor01@gmail.com"},"_npmVersion":"10.9.2","description":"A NestJS library designed to provide EF-Core-like operations using Prisma as the underlying ORM. It simplifies query building, data manipulation, and integration with Prisma, offering a unified and extensible API for database interactions. Additionally, i","directories":{},"_nodeVersion":"22.13.1","dependencies":{"linqts":"^1.0.0","@prisma/client":"^4.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0","@prisma/client":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/prisma-core_1.1.17_1749917996377_0.8189673483609334","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@algochad/prisma-core","version":"1.2.0","keywords":["nestjs","prisma","graphql","genql","library","ef-core","query-builder","database","orm","linq","csharp","typescript","collections","enumerable","queryable"],"author":{"name":"AlgoChad"},"license":"MIT","_id":"@algochad/prisma-core@1.2.0","maintainers":[{"name":"algochad","email":"givillamor01@gmail.com"}],"homepage":"https://github.com/algochad/prisma-core#readme","bugs":{"url":"https://github.com/algochad/prisma-core/issues"},"dist":{"shasum":"20118cce51e490605241688fe385472ba0cf7f7c","tarball":"https://registry.npmjs.org/@algochad/prisma-core/-/prisma-core-1.2.0.tgz","fileCount":84,"integrity":"sha512-Ah7NGyfWRw7KaOHcyX/F23EBZpV1HKS+fjsM4WVHZGueU8hZWSID5+eOUBaSymhYcoeQAFGkLBqOvq8rdSdl1g==","signatures":[{"sig":"MEUCIQD46rndh+nyh844Uv/QQVMEcvWF4ktAuMd6PAbT2AjU1QIgdiX9otZ5iMCtyvqLNpAZr2faxunC7dsyieA0+fuFK9g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":579586},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a969fcee871997f75e66228c3e03ce87d6c8dcf3","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc -p tsconfig.lib.json","format":"prettier --write src/**/*.ts"},"_npmUser":{"name":"algochad","email":"givillamor01@gmail.com"},"repository":{"url":"git+https://github.com/algochad/prisma-core.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive NestJS library that provides EF-Core-like operations using Prisma and GraphQL. Features LINQ-style query builders, advanced data manipulation, GraphQL integration with genql, and a unified API for both Prisma and GraphQL operations. Includ","directories":{},"_nodeVersion":"22.13.1","dependencies":{"rxjs":"^7.8.0","linqts":"^1.0.0","@prisma/client":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"graphql":"^16.0.0","@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0","@prisma/client":"^5.0.0","@nestjs/graphql":"^10.0.0 || ^11.0.0 || ^12.0.0"},"_npmOperationalInternal":{"tmp":"tmp/prisma-core_1.2.0_1750009414346_0.025150763542407306","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@algochad/prisma-core","version":"1.2.1","keywords":["nestjs","prisma","graphql","genql","library","ef-core","query-builder","database","orm","linq","csharp","typescript","collections","enumerable","queryable"],"author":{"name":"AlgoChad"},"license":"MIT","_id":"@algochad/prisma-core@1.2.1","maintainers":[{"name":"algochad","email":"givillamor01@gmail.com"}],"homepage":"https://github.com/algochad/prisma-core#readme","bugs":{"url":"https://github.com/algochad/prisma-core/issues"},"dist":{"shasum":"510436dad337c1aed2eccc9de279e2d062d896d2","tarball":"https://registry.npmjs.org/@algochad/prisma-core/-/prisma-core-1.2.1.tgz","fileCount":108,"integrity":"sha512-JyHi+bqmOmU2Qx0/XiwumrddxpJlPpGGcDooo4cq01LFM8tTEj+vyTqpqc3U7BOh0XejdYokqJXIXqxP5rCOzQ==","signatures":[{"sig":"MEYCIQCN+K/5cu64WziKqLsXId6TW2Y9ffQBM/76TrbaCe4P7AIhAK5GaQ2OpA/nhB9x2GHN8XjPW7T0XH+DMJw/TjegHa/o","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":763773},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a969fcee871997f75e66228c3e03ce87d6c8dcf3","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc -p tsconfig.lib.json","format":"prettier --write src/**/*.ts"},"_npmUser":{"name":"algochad","email":"givillamor01@gmail.com"},"repository":{"url":"git+https://github.com/algochad/prisma-core.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive NestJS library that provides EF-Core-like operations using Prisma and GraphQL. Features LINQ-style query builders, advanced data manipulation, GraphQL integration with genql, and a unified API for both Prisma and GraphQL operations. Includ","directories":{},"_nodeVersion":"22.13.1","dependencies":{"rxjs":"^7.8.0","linqts":"^1.0.0","@prisma/client":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"graphql":"^16.0.0","@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0","@prisma/client":"^5.0.0","@nestjs/graphql":"^10.0.0 || ^11.0.0 || ^12.0.0"},"_npmOperationalInternal":{"tmp":"tmp/prisma-core_1.2.1_1750009681611_0.47613172206155085","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@algochad/prisma-core","version":"1.2.2","keywords":["nestjs","prisma","graphql","genql","library","ef-core","query-builder","database","orm","linq","csharp","typescript","collections","enumerable","queryable"],"author":{"name":"AlgoChad"},"license":"MIT","_id":"@algochad/prisma-core@1.2.2","maintainers":[{"name":"algochad","email":"givillamor01@gmail.com"}],"homepage":"https://github.com/algochad/prisma-core#readme","bugs":{"url":"https://github.com/algochad/prisma-core/issues"},"dist":{"shasum":"0d3231e7b452cd5de6254c85b1c9cf82f1b0d6e3","tarball":"https://registry.npmjs.org/@algochad/prisma-core/-/prisma-core-1.2.2.tgz","fileCount":108,"integrity":"sha512-1NrLCr0ZX5ykptBSPFuVvVODZANLcGD7q+dztL4UKW7KN6eDdR36PvZ54zRmcEs3wR4kFfg4CdnpXfzjmj00QQ==","signatures":[{"sig":"MEYCIQCQ3LfhSWGmQ/Nb2aQ7R9w0E3hivTyTUhuddEpoFaZCRQIhANTQhQnwGB7+jhJVyhk6UOyzmxpBXvdVb1RZlZRWZ4v2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":763770},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a969fcee871997f75e66228c3e03ce87d6c8dcf3","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"tsc -p tsconfig.lib.json","format":"prettier --write src/**/*.ts"},"_npmUser":{"name":"algochad","email":"givillamor01@gmail.com"},"repository":{"url":"git+https://github.com/algochad/prisma-core.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive NestJS library that provides EF-Core-like operations using Prisma and GraphQL. Features LINQ-style query builders, advanced data manipulation, GraphQL integration with genql, and a unified API for both Prisma and GraphQL operations. Includ","directories":{},"_nodeVersion":"22.13.1","dependencies":{"rxjs":"^7.8.0","linqts":"^1.0.0","@prisma/client":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"graphql":"^16.0.0","@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0","@prisma/client":"^5.0.0","@nestjs/graphql":"^10.0.0 || ^11.0.0 || ^12.0.0"},"_npmOperationalInternal":{"tmp":"tmp/prisma-core_1.2.2_1750043864346_0.31732103370725895","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@algochad/prisma-core","version":"1.2.3","description":"A comprehensive NestJS library that provides EF-Core-like operations using Prisma and GraphQL. Features LINQ-style query builders, advanced data manipulation, GraphQL integration with genql, and a unified API for both Prisma and GraphQL operations. Includ","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.lib.json","test":"jest","lint":"eslint src/**/*.ts","format":"prettier --write src/**/*.ts"},"keywords":["nestjs","prisma","graphql","genql","library","ef-core","query-builder","database","orm","linq","csharp","typescript","collections","enumerable","queryable"],"author":{"name":"AlgoChad"},"license":"MIT","dependencies":{"@prisma/client":"^5.0.0","linqts":"^1.0.0","rxjs":"^7.8.0"},"peerDependencies":{"@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0","@nestjs/graphql":"^10.0.0 || ^11.0.0 || ^12.0.0","@prisma/client":"^5.0.0","graphql":"^16.0.0"},"devDependencies":{"@types/jest":"^29.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.0.0","prettier":"^3.0.0","typescript":"^5.0.0"},"repository":{"type":"git","url":"git+https://github.com/algochad/prisma-core.git"},"bugs":{"url":"https://github.com/algochad/prisma-core/issues"},"homepage":"https://github.com/algochad/prisma-core#readme","_id":"@algochad/prisma-core@1.2.3","gitHead":"a969fcee871997f75e66228c3e03ce87d6c8dcf3","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Q+5ZIb+yOmUlvvBCNgp8uG17L835UkBYyFahzNXXU7LU/Lbcp/C71ukvjgyvur3L/2kDM8xhl8WDAnJFqlQj/Q==","shasum":"a89a78ff75ac5f848d94d6219ea2b69b15509c88","tarball":"https://registry.npmjs.org/@algochad/prisma-core/-/prisma-core-1.2.3.tgz","fileCount":130,"unpackedSize":839327,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDMwyypa9dRGEFvET03EpsP8VPRaFPB7v5Vva1/AUDp0gIhAJZ9LTABOvDP2y1AymGS/KeRHwRWXU+i8hmbUCftbBiL"}]},"_npmUser":{"name":"algochad","email":"givillamor01@gmail.com"},"directories":{},"maintainers":[{"name":"algochad","email":"givillamor01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prisma-core_1.2.3_1750069256187_0.23264408406721016"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-15T17:43:34.201Z","modified":"2025-06-16T10:20:56.549Z","1.0.0":"2025-06-02T16:31:25.681Z","1.0.1":"2025-06-02T16:34:13.157Z","1.0.2":"2025-06-02T16:35:17.570Z","1.0.3":"2025-06-02T16:37:20.966Z","1.0.4":"2025-06-02T16:39:00.791Z","1.0.5":"2025-06-02T16:44:37.788Z","1.0.6":"2025-06-02T16:47:23.782Z","1.0.7":"2025-06-02T16:48:07.255Z","1.0.10":"2025-06-02T16:48:41.642Z","1.0.11":"2025-06-02T16:51:20.909Z","1.0.12":"2025-06-02T16:55:46.665Z","1.1.0":"2025-06-02T17:00:29.382Z","1.1.1":"2025-06-02T17:04:23.484Z","1.1.2":"2025-06-02T17:08:16.609Z","1.1.3":"2025-06-02T17:47:10.280Z","1.1.4":"2025-06-03T18:08:03.828Z","1.1.5":"2025-06-03T18:11:34.367Z","1.1.6":"2025-06-04T17:40:03.041Z","1.1.7":"2025-06-04T17:43:53.897Z","1.1.8":"2025-06-05T14:27:40.586Z","1.1.9":"2025-06-05T14:29:27.896Z","1.1.10":"2025-06-13T16:32:29.046Z","1.1.11":"2025-06-13T16:36:34.956Z","1.1.12":"2025-06-13T17:13:56.204Z","1.1.14":"2025-06-13T19:11:44.711Z","1.1.15":"2025-06-14T07:44:15.522Z","1.1.16":"2025-06-14T16:18:43.050Z","1.1.17":"2025-06-14T16:19:56.556Z","1.2.0":"2025-06-15T17:43:34.581Z","1.2.1":"2025-06-15T17:48:01.866Z","1.2.2":"2025-06-16T03:17:44.587Z","1.2.3":"2025-06-16T10:20:56.388Z"},"bugs":{"url":"https://github.com/algochad/prisma-core/issues"},"author":{"name":"AlgoChad"},"license":"MIT","homepage":"https://github.com/algochad/prisma-core#readme","keywords":["nestjs","prisma","graphql","genql","library","ef-core","query-builder","database","orm","linq","csharp","typescript","collections","enumerable","queryable"],"repository":{"type":"git","url":"git+https://github.com/algochad/prisma-core.git"},"description":"A comprehensive NestJS library that provides EF-Core-like operations using Prisma and GraphQL. Features LINQ-style query builders, advanced data manipulation, GraphQL integration with genql, and a unified API for both Prisma and GraphQL operations. Includ","maintainers":[{"name":"algochad","email":"givillamor01@gmail.com"}],"readme":"# @algochad/prisma-core\n\nA powerful NestJS library that brings Entity Framework Core-like operations to Prisma ORM and GraphQL, enhanced with C# LINQ-style data manipulation capabilities. This library provides a unified, type-safe API for database interactions while offering advanced query building, data transformation, and performance optimization features.\n\n---\n\n## 🚀 Features\n\n- **🏗️ EF-Core-like Operations**: Intuitive query building and data manipulation using Prisma ORM\n- **🌐 GraphQL Data Source Support**: Full LINQ-style queries with GraphQL APIs (requires schema matching)\n- **🔗 LINQ Operations**: Basic port of C# LINQ operations for advanced data queries and transformations\n- **🔧 Extensible API**: Unified, type-safe API for seamless database and GraphQL interactions\n- **⚡ Performance Optimized**: Built-in benchmarking and performance optimization tools\n- **🏢 NestJS Integration**: Native integration designed specifically for NestJS applications\n- **📊 Universal Repository Pattern**: Dynamic model access with full type safety across data sources\n- **🔄 Transaction Support**: Comprehensive transaction management capabilities (Prisma ORM)\n\n---\n\n## 📚 Quick Navigation\n\n### 🚀 Getting Started\n\n- **[📦 Installation Guide](./docs/installation.md)** - Set up the library in your project\n- **[🛠️ Quick Setup Guide](./docs/quick-setup.md)** - Complete setup with examples\n- **[⭐ Quick Start Patterns](./docs/quick-start-patterns.md)** - Most commonly used Select & OrderBy patterns\n\n### 📖 Core Documentation\n\n- **[📖 Usage Guide](./docs/usage-guide.md)** - Basic query operations and patterns\n- **[🔗 LINQ Operations](./docs/linq-operations.md)** - Synchronous and asynchronous LINQ operations\n- **[🏛️ Universal Repository Pattern](./docs/repository-pattern.md)** - Three ways to access models\n- **[⚡ Performance Benchmarks](./docs/performance.md)** - Comprehensive benchmarking and optimization guide\n\n### 📚 Reference & Help\n\n- **[🛠️ API Reference](./docs/api-reference.md)** - Complete API documentation\n- **[🔧 Troubleshooting](./docs/troubleshooting.md)** - Common issues and solutions\n- **[📚 Examples & Tutorials](./docs/examples.md)** - Real-world examples and tutorials\n\n### 🤝 Community\n\n- **[🤝 Contributing](./docs/contributing.md)** - How to contribute to the project\n- **[📄 License](./docs/LICENSE.md)** - MIT License details\n\n---\n\n## ⚡ Quick Example\n\n```typescript\n// Simple query with field selection and sorting\nconst results = await repository.test\n    .Where({ isActive: true })\n    .Select({\n        id: true,\n        name: true,\n        description: true,\n    })\n    .OrderBy({ name: 'asc' })\n    .ToArray();\n\n// LINQ-style transformations\nconst transformed = await repository.test\n    .Where({ isActive: true })\n    .ToEnumerable()\n    .Where((test) => test.description != null)\n    .Select((test) => ({\n        id: test.id,\n        displayName: test.name.toUpperCase(),\n        summary: `${test.name}: ${test.description}`,\n    }))\n    .OrderBy((item) => item.displayName)\n    .ToArray();\n\n// Async performance optimization for large datasets\nconst optimized = await AsyncEnumerable.from(largeDataset)\n    .Where(async (item) => await validateAsync(item))\n    .Select(async (item) => await transformAsync(item))\n    .ToArrayAsync();\n```\n\n---\n\n## 📊 Performance Highlights\n\n- **⚡ 76% Performance Improvement** with AsyncEnumerable for complex operations\n- **💾 7% Memory Efficiency** gains with async processing\n- **🎯 2.8x Faster Sorting** operations with async implementations\n- **📈 Scales to 100K+ items** with optimized processing\n\n### When to Use What\n\n| Operation Type          | Dataset Size  | Recommendation    | Reason                      |\n| ----------------------- | ------------- | ----------------- | --------------------------- |\n| Simple filtering        | < 1,000 items | `Enumerable`      | Lower overhead              |\n| Complex transformations | > 1,000 items | `AsyncEnumerable` | Parallel processing         |\n| Database queries        | Any size      | `AsQueryable()`   | Database-level optimization |\n| Sorting operations      | > 1,000 items | `AsyncEnumerable` | 2.8x performance gain       |\n\n---\n\n## 🏗️ Repository Setup\n\n```typescript\n@Injectable()\nexport class AppRepository extends PrismaRepository {\n    constructor(databaseService: PrismaCoreService) {\n        super(databaseService);\n    }\n\n    // Typed accessor for User model\n    get user(): PrismaUnifiedBuilder<User> {\n        return this.model<User>('user') as any;\n    }\n\n    // Typed accessor for Post model\n    get post(): PrismaUnifiedBuilder<Post> {\n        return this.model<Post>('post') as any;\n    }\n}\n```\n\n---\n\n## 🔗 Links and Resources\n\n- **📖 Full Documentation**: [Complete Documentation](./docs/README.md)\n- **📦 NPM Package**: [@algochad/prisma-core](https://www.npmjs.com/package/@algochad/prisma-core)\n- **🐛 GitHub Issues**: [Report Issues](https://github.com/algochad/prisma-core/issues)\n- **💬 GitHub Discussions**: [Community Discussions](https://github.com/algochad/prisma-core/discussions)\n- **🏗️ Prisma Documentation**: [Prisma Docs](https://www.prisma.io/docs)\n- **🏢 NestJS Documentation**: [NestJS Docs](https://docs.nestjs.com)\n\n---\n\n<div align=\"center\">\n\n**Made with ❤️ for the NestJS and Prisma community**\n\n_Star ⭐ this project if you find it helpful!_\n\n**[📚 Start with the Installation Guide →](./docs/installation.md)**\n\n</div>\n","readmeFilename":"README.md"}