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

typeorm-iris

v0.1.4

Published

A TypeORM driver for InterSystems IRIS database, providing seamless integration between TypeORM and IRIS databases.

Downloads

32

Readme

TypeORM-IRIS

A TypeORM driver for InterSystems IRIS database, providing seamless integration between TypeORM and IRIS databases.

Overview

This driver enables you to use TypeORM with InterSystems IRIS databases, supporting both traditional SQL operations and IRIS-specific features. It includes connection pooling for high-performance applications.

Installation

npm install typeorm-iris

Quick Start

Basic Connection

import { IRISDataSource, IRISConnectionOptions } from "typeorm-iris"

const dataSourceOptions: IRISConnectionOptions = {
    name: "iris",
    type: "iris",
    host: "localhost",
    port: 1972,
    username: "_SYSTEM",
    password: "SYS",
    namespace: "USER",
    logging: true,
    dropSchema: true,
}

export function createDataSource(options: any): IRISDataSource {
    // @ts-ignore
    const dataSource = new IRISDataSource({ ...dataSourceOptions, ...options })
    return dataSource
}

Entity Definition

import { Column, Entity } from "typeorm"
import { PrimaryColumn } from "typeorm"
import { Generated } from "typeorm"

@Entity("sample01_post")
export class Post {
    @PrimaryColumn()
    @Generated()
    id: number

    @Column()
    title: string

    @Column()
    text: string

    @Column({ nullable: false })
    likesCount: number
}

Basic Operations

import "reflect-metadata"
import { Post } from "./entity/Post"
import { createDataSource } from "../datasource"

async function main() {
    const dataSource = createDataSource({
        logging: true,
        synchronize: true,
        entities: [Post as any],
    })

    try {
        await dataSource.initialize()
    } catch (error) {
        console.log("Cannot connect: ", error)
        return
    }

    const post = new Post()
    post.text = "Hello how are you?"
    post.title = "hello"
    post.likesCount = 100

    const postRepository = dataSource.getRepository(Post)

    try {
        await postRepository.save(post)
        console.log("Post has been saved: ", post)
    } catch (error) {
        console.log("Cannot save. Error: ", error)
    }

    await dataSource.destroy()
}

void main()

Configuration Options

interface IRISConnectionOptions {
    type: "iris"
    host?: string
    port?: number
    username?: string
    password?: string
    namespace?: string
    sharedmemory?: boolean // Default: false (required for 2025.2+)
    poolSize?: number // Default: 5
    connectTimeout?: number // Default: 10 seconds
    entities?: EntitySchema[] // Entity definitions
    synchronize?: boolean // Auto-create tables
    logging?: boolean // Enable query logging
}

Connection Pooling

The driver includes built-in connection pooling to prevent memory leaks:

import { IRISConnectionPool } from "typeorm-iris"

const pool = new IRISConnectionPool(
    {
        host: "localhost",
        port: 1972,
        ns: "USER",
        user: "_SYSTEM",
        pwd: "SYS",
        sharedmemory: false,
    },
    5,
) // Max 5 connections

// Get connection from pool
const connection = await pool.getConnection()

try {
    // Use connection
    const iris = connection.createIris()
    // ... database operations
} finally {
    // Always release connection back to pool
    pool.releaseConnection(connection)
}

// Clean shutdown
await pool.closeAll()

Examples

The repository includes several example files:

  • sample/ - TypeORM entity examples

Supported Data Types

The driver supports all standard SQL data types plus IRIS-specific types:

| TypeORM Type | IRIS Type | Notes | | ------------------ | ---------- | ------------------------ | | integer | INTEGER | Auto-increment supported | | varchar | VARCHAR | Default length: 255 | | text | TEXT | Large text fields | | datetime | DATETIME | Timestamps | | boolean | BIT | True/false values | | decimal | DECIMAL | Precision and scale | | uniqueidentifier | UUID | GUID support |

Development

Building the Project

npm run build

Running Tests

Start IRIS

docker compose up -d iris
npm test

Optionally tests can run with testcontainers, image needs to be passed as envionment variable

export IRIS_IMAGE=containers.intersystems.com/intersystems/iris-community:latest-preview

Type Checking

npm run typecheck

Running Examples

# Basic demo
node build/compiled/sample1-simple-entity/app.js

node build/compiled/sample2-one-to-one/app.js

node build/compiled/sample3-many-to-one/app.js

node build/compiled/sample4-many-to-many/app.js

node build/compiled/sample16-indexes/app.js

Requirements

  • Node.js 20+
  • InterSystems IRIS 2025.1+
  • TypeORM 0.3+

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support