Setu-TS
    Preparing search index...

    Function createPrismaDataSource

    • Creates a DataSource backed by a Prisma client for the given entity name.

      Convention: entity name 'User' → delegate accessed as client.user (first letter lowercased). If the delegate is absent on the client, the error names the entity and the convention so the caller can fix the entity name.

      Parameters

      • client: PrismaClient

        The Prisma client (or transaction client) instance

      • entity: string

        Entity / model name (e.g. 'User')

      • Optionalprovider: PrismaSqlProvider

        The Prisma SQL provider (connector)

      • OptionalkeyColumns: readonly string[]

        The resolved primary-key columns (defaults to ['id'])

      • OptionalcompoundKeyField: string

        The compound-key field name, or undefined for scalar keys

      Returns IDataSource

      A data source bound to the Prisma model

      0.1.0