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

@l-v-yonsama/multi-platform-database-drivers

v1.2.0

Published

multi-platform database drivers in TypeScript.

Downloads

2,014

Readme

Prepare

cd ./docker

docker compose -f unit-test.yml build

docker compose -f unit-test.yml up -d

cd ..

Test accounts (provisioned by __tests__/setup/*.ts on each test run):

| Vendor | Host:Port | Database | User | Password | Notes | | :--- | :--- | :--- | :--- | :--- | :--- | | MySQL | 127.0.0.1:6001 | test-db | testuser | testpass | app user | | MySQL | 127.0.0.1:6001 | (all) | testadmin | testpass | ALL PRIVILEGES, for session kill | | PostgreSQL | 127.0.0.1:6002 | testdb | testuser | testpass | already superuser (POSTGRES_USER) | | PostgreSQL | 127.0.0.1:6002 | (all) | testadmin | testpass | SUPERUSER, kept separate from testuser | | Oracle | 127.0.0.1:6012/FREEPDB1 | - | testuser | testpass | APP_USER | | Oracle | 127.0.0.1:6012/FREEPDB1 | (all) | testadmin | testpass | DBA role, for session kill | | SQL Server | 127.0.0.1:6433 | testdb | testuser | Pass123zxcv! | db_owner on testdb | | SQL Server | 127.0.0.1:6433 | (all) | testadmin | Pass123zxcv! | sysadmin role, for session kill |

yarn add @l-v-yonsama/multi-platform-database-drivers
OR
npm i @l-v-yonsama/multi-platform-database-drivers
import {
  DBDriverResolver,
  RDSBaseDriver,
  ResultSetDataBuilder,
  ConnectionSetting,
  DBType,
} from "@l-v-yonsama/multi-platform-database-drivers";

const connectOption: ConnectionSetting = {
  host: '127.0.0.1',
  port: 6001,
  user: 'testuser',
  password: 'testpass',
  database: 'testdb',
  dbType: DBType.MySQL,
  name: 'mysql',
};

(async (): Promise<void> => {
  const { ok, message, result } =
    await DBDriverResolver.getInstance().workflow<RDSBaseDriver>(
      connectOption,
      async (driver) => {
        const dbs = await driver.getInfomationSchemas();
        const table = dbs[0].getSchema({ isDefault: true }).children[0];
        return await driver.requestSql({
          sql: 'SELECT * FROM ' + table.name,
        });
      },
    );

  console.log('ok', ok);
  console.log('message', message);
  console.log(result);

  console.log(
    ResultSetDataBuilder.from(result).toMarkdown({
      withType: true,
      withComment: true,
    }),
  );
})();
ok true
message
{
  created: 2023-07-29T00:03:17.230Z,
  keys: [
    {
      name: 'DEPTNO',
      type: 14,
      comment: '部門番号',
      width: undefined,
      required: true
    },
    {
      name: 'DNAME',
      type: 4,
      comment: '部門名',
      width: undefined,
      required: false
    },
    {
      name: 'LOC',
      type: 4,
      comment: 'ロケーション',
      width: undefined,
      required: false
    }
  ],
  rows: [
    { meta: {}, values: [Object] },
    { meta: {}, values: [Object] },
    { meta: {}, values: [Object] },
    { meta: {}, values: [Object] }
  ],
  meta: {
    connectionName: 'mysql',
    comment: '部門',
    tableName: 'DEPT',
    compareKeys: [ [Object] ],
    type: 'select',
    editable: undefined
  },
  sqlStatement: 'SELECT * FROM DEPT',
  queryConditions: undefined
}
| DEPTNO | DNAME | LOC |
| :---: | :---: | :---: |
| 部門番号 | 部門名 | ロケーション |
| INTEGER | VARCHAR | VARCHAR |
| 10 | ACCOUNTING | NEW YORK |
| 20 | RESEARCH | DALLAS |
| 30 | SALES | CHICAGO |
| 40 | OPERATIONS | BOSTON |

Project Structure

This package exposes one driver per database/service behind a shared interface. High-level layout:

src/
├── index.ts      # public entry point (re-exports everything below)
├── drivers/      # one <Engine>Driver.ts per DB/service
│   │             #   BaseDriver → BaseSQLSupportDriver → RDSBaseDriver
│   │             #   (MySQL/Postgres/SQLite/SQLServer/Oracle extend RDSBaseDriver;
│   │             #    Auth0/Keycloak/Memcache/Mqtt/Redis/Aws extend BaseDriver directly)
│   ├── aws/        # AWS service clients (S3/SQS/SES/Dynamo/CloudWatch) used by AwsDriver
│   └── memcache/    # helper used internally by MemcacheDriver
├── resource/     # DB metadata model: DbDatabase/DbSchema/DbTable/DbColumn hierarchy
├── helpers/      # SQL parsing/formatting (SQLHelper), rule engine, autocomplete proposals
│   └── prompts/    # per-dbType "schema definitions for LLM prompt" builders
├── types/        # types/interfaces/enums only, mirrors drivers/resource/helpers/utils
├── utils/        # standalone utilities + the SQL/application log-parsing pipeline (utils/log/)
└── examples/     # per-driver usage scripts (gitignored, not published to npm)

Every directory has its own index.ts that re-exports its contents (export * from './X'), so src/index.ts is the single public API surface shipped to consumers (built/src/index.js).

__tests__/ loosely mirrors this layout (db/drivers/, helpers/, helpers/prompts/, resource/, util/), plus test-only data/ (fixtures) and setup/ (docker test-account bootstrap) folders.

Other top-level folders:

  • docker/ — Docker Compose config for the local test databases used by __tests__/setup/*.ts (see "Prepare" above)
  • schema/ — JSON Schema generated from the LogParseConfig type (npm run build:schema, via typescript-json-schema); consumed by the db-notebook VS Code extension as the JSON Validator schema for *.log-parser.config.json files

Release

for local test

npm pack

publish

npm publish

npm notice Publishing to https://registry.npmjs.org/
This operation requires a one-time password.
Enter OTP: xxxxxx<ENTER>