npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@algochad/prisma-core

v1.2.3

Published

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

Readme

@algochad/prisma-core

A 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.


🚀 Features

  • 🏗️ EF-Core-like Operations: Intuitive query building and data manipulation using Prisma ORM
  • 🌐 GraphQL Data Source Support: Full LINQ-style queries with GraphQL APIs (requires schema matching)
  • 🔗 LINQ Operations: Basic port of C# LINQ operations for advanced data queries and transformations
  • 🔧 Extensible API: Unified, type-safe API for seamless database and GraphQL interactions
  • ⚡ Performance Optimized: Built-in benchmarking and performance optimization tools
  • 🏢 NestJS Integration: Native integration designed specifically for NestJS applications
  • 📊 Universal Repository Pattern: Dynamic model access with full type safety across data sources
  • 🔄 Transaction Support: Comprehensive transaction management capabilities (Prisma ORM)

📚 Quick Navigation

🚀 Getting Started

📖 Core Documentation

📚 Reference & Help

🤝 Community


⚡ Quick Example

// Simple query with field selection and sorting
const results = await repository.test
    .Where({ isActive: true })
    .Select({
        id: true,
        name: true,
        description: true,
    })
    .OrderBy({ name: 'asc' })
    .ToArray();

// LINQ-style transformations
const transformed = await repository.test
    .Where({ isActive: true })
    .ToEnumerable()
    .Where((test) => test.description != null)
    .Select((test) => ({
        id: test.id,
        displayName: test.name.toUpperCase(),
        summary: `${test.name}: ${test.description}`,
    }))
    .OrderBy((item) => item.displayName)
    .ToArray();

// Async performance optimization for large datasets
const optimized = await AsyncEnumerable.from(largeDataset)
    .Where(async (item) => await validateAsync(item))
    .Select(async (item) => await transformAsync(item))
    .ToArrayAsync();

📊 Performance Highlights

  • ⚡ 76% Performance Improvement with AsyncEnumerable for complex operations
  • 💾 7% Memory Efficiency gains with async processing
  • 🎯 2.8x Faster Sorting operations with async implementations
  • 📈 Scales to 100K+ items with optimized processing

When to Use What

| Operation Type | Dataset Size | Recommendation | Reason | | ----------------------- | ------------- | ----------------- | --------------------------- | | Simple filtering | < 1,000 items | Enumerable | Lower overhead | | Complex transformations | > 1,000 items | AsyncEnumerable | Parallel processing | | Database queries | Any size | AsQueryable() | Database-level optimization | | Sorting operations | > 1,000 items | AsyncEnumerable | 2.8x performance gain |


🏗️ Repository Setup

@Injectable()
export class AppRepository extends PrismaRepository {
    constructor(databaseService: PrismaCoreService) {
        super(databaseService);
    }

    // Typed accessor for User model
    get user(): PrismaUnifiedBuilder<User> {
        return this.model<User>('user') as any;
    }

    // Typed accessor for Post model
    get post(): PrismaUnifiedBuilder<Post> {
        return this.model<Post>('post') as any;
    }
}

🔗 Links and Resources


Made with ❤️ for the NestJS and Prisma community

Star ⭐ this project if you find it helpful!

📚 Start with the Installation Guide →