
Security News
/Company News
Socket Is Sponsoring Composer and Packagist
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.
@prisma-next/sql-relational-core
Advanced tools
Schema and column builders, operation attachment, and AST types for Prisma Next
Schema and column builders, operation attachment, and AST types for Prisma Next.
The relational core package provides the foundational primitives for building relational SQL queries. It includes table/column builders, parameter helpers, operation attachment logic, and type definitions that are shared across SQL query lanes (DSL, ORM, Raw).
This package is part of the SQL lanes layer and provides the relational primitives that both the SQL DSL and ORM builder depend on.
Provide shared relational primitives (schema builders, column builders, parameter helpers, operations registry) that can be consumed by multiple SQL query lanes without code duplication.
Non-goals:
flowchart TD
subgraph "Relational Core"
SCHEMA[Schema Builder]
COL[Column Builders]
PARAM[Parameter Helpers]
OPS[Operations Registry]
TYPES[Type Definitions]
end
subgraph "Consumers"
SQL[SQL Lane]
ORM[ORM Lane]
end
SCHEMA --> SQL
SCHEMA --> ORM
COL --> SQL
COL --> ORM
PARAM --> SQL
PARAM --> ORM
OPS --> SQL
OPS --> ORM
TYPES --> SQL
TYPES --> ORM
schema.ts)tables.user.id in addition to tables.user.columns.id)types.ts)ColumnBuilder type with operation methods based on column typeIdparam.ts)operations-registry.ts)ColumnBuilder instancestypeId and contract capabilitiesplan.ts)SqlQueryPlan<Row> interface for SQL query plans produced by lanes before loweringaugmentDescriptorWithColumnMeta(descriptors, columnMeta) helper to update ParamDescriptor with codecId and nativeType from column metadatatypes.ts)ExtractJsTypeFromColumnBuilder)AnyColumnBuilder helper type for accepting column builders with any operation types@prisma-next/contract: Core contract types@prisma-next/plan: Plan error helpers (planInvalid, planUnsupported) and RuntimeError type@prisma-next/runtime: Runtime context types (TODO: Slice 6 will clean this up)@prisma-next/sql-target: SQL contract types, adapter interfacesNote: This package does not depend on specific adapters (e.g., @prisma-next/adapter-postgres). Test fixtures define CodecTypes inline to remain adapter-agnostic and avoid cyclic dependencies.
Note: Error helpers (planInvalid, planUnsupported) and the RuntimeError type are imported from @prisma-next/plan (core ring) rather than being defined locally. This ensures target-agnostic error handling.
This package follows the standard exports/ directory pattern:
src/exports/schema.ts - Re-exports schema buildersrc/exports/param.ts - Re-exports parameter helperssrc/exports/types.ts - Re-exports type definitionssrc/exports/operations-registry.ts - Re-exports operations registrysrc/exports/plan.ts - Re-exports plan types and helperssrc/exports/errors.ts - Re-exports error helpers (from @prisma-next/plan)src/index.ts - Main entry point that re-exports from exports/This enables subpath imports like @prisma-next/sql-relational-core/schema, @prisma-next/sql-relational-core/param, @prisma-next/sql-relational-core/plan, etc.
FAQs
AST types, query lane context, and type utilities for Prisma Next SQL lanes
The npm package @prisma-next/sql-relational-core receives a total of 14,961 weekly downloads. As such, @prisma-next/sql-relational-core popularity was classified as popular.
We found that @prisma-next/sql-relational-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.

Research
/Security News
Benign-looking npm packages split malicious functionality across a dependency chain that deploys a cross-platform RAT targeting Alibaba developers.

Research
/Security News
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.