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

@objectstack/objectql

v3.0.6

Published

Isomorphic ObjectQL Engine for ObjectStack

Readme

@objectstack/objectql

The Data Engine for ObjectStack. It acts as a semantic layer between your application code and the underlying database.

Features

  • Universal API: A consistent query interface (find, insert, update, delete) regardless of the storage backend.
  • Schema Validation: Enforces Zod schemas defined in @objectstack/spec.
  • Query Resolution: Translates ObjectStack queries into driver-specific commands.
  • Driver Architecture: Pluggable storage (Memory, MongoDB, SQL, etc.).
  • Schema Registry: Centralized object/FQN management with multi-package ownership model.
  • Kernel Factory: One-liner kernel bootstrap with createObjectQLKernel().
  • Database Introspection: Convert existing database schemas into ObjectStack metadata via convertIntrospectedSchemaToObjects().
  • Metadata Facade: Injectable IMetadataService-compatible wrapper over SchemaRegistry.

Usage

Querying Data

import { ObjectQL } from '@objectstack/objectql';

const engine = kernel.getService('objectql');
const users = await engine.find('user', {
    where: { role: 'admin' },
    top: 10
});

Kernel Factory

Create a fully wired ObjectKernel in one call:

import { createObjectQLKernel } from '@objectstack/objectql';

const kernel = await createObjectQLKernel({
  plugins: [myDriverPlugin, myAuthPlugin],
});
await kernel.bootstrap();

Database Introspection

Convert existing database tables into ObjectStack object definitions:

import { convertIntrospectedSchemaToObjects } from '@objectstack/objectql';

const schema = await driver.introspectSchema();
const objects = convertIntrospectedSchemaToObjects(schema, {
  excludeTables: ['migrations', '_prisma_migrations'],
});

for (const obj of objects) {
  engine.registerObject(obj);
}

Schema Registry

import { SchemaRegistry, computeFQN } from '@objectstack/objectql';

// Register an object under a namespace
SchemaRegistry.registerObject(taskDef, 'com.acme.todo', 'todo');

// Resolve FQN
computeFQN('todo', 'task'); // => 'todo__task'
computeFQN('base', 'user'); // => 'user' (reserved namespace)

Exported Components

| Export | Description | | :--- | :--- | | ObjectQL | Data engine implementing IDataEngine | | ObjectRepository | Scoped repository bound to object + context | | ScopedContext | Identity-scoped execution context with object() accessor | | SchemaRegistry | Global schema registry (FQN, ownership, package management) | | MetadataFacade | Async IMetadataService-compatible wrapper | | ObjectQLPlugin | Kernel plugin that registers ObjectQL services | | ObjectStackProtocolImplementation | Protocol implementation shim | | createObjectQLKernel() | Async factory returning a pre-wired ObjectKernel | | toTitleCase() | Convert snake_case to Title Case | | convertIntrospectedSchemaToObjects() | DB schema → ServiceObject[] converter |

Introspection Types

| Type | Description | | :--- | :--- | | IntrospectedSchema | Top-level schema with tables map | | IntrospectedTable | Table metadata (columns, foreign keys, primary keys) | | IntrospectedColumn | Column metadata (name, type, nullable, maxLength, …) | | IntrospectedForeignKey | Foreign key relationship metadata |

Migrating from @objectql/core

If you are migrating from the downstream @objectql/core package, see the Migration Guide for step-by-step instructions.

Quick summary:

- import { ObjectQL, SchemaRegistry, ObjectRepository } from '@objectql/core';
- import { createObjectQLKernel } from '@objectql/core';
- import { toTitleCase, convertIntrospectedSchemaToObjects } from '@objectql/core';
+ import { ObjectQL, SchemaRegistry, ObjectRepository } from '@objectstack/objectql';
+ import { createObjectQLKernel } from '@objectstack/objectql';
+ import { toTitleCase, convertIntrospectedSchemaToObjects } from '@objectstack/objectql';

License

Apache-2.0 © ObjectStack