Registry / database / drizzle-sybase

drizzle-sybase

JSON →
library1.1.0jsnpmunverified

Native Node.js driver for Sybase ASE databases, built as a Drizzle ORM integration using FreeTDS via N-API. Current version 1.1.0 (pre-release candidate) targets Node >=24 and requires drizzle-orm ^1.0.0-rc.2. Differentiates from other Sybase drivers by providing typed ORM interfaces with Drizzle's query builder and migration tools. Release cadence is irregular; development is active but pre-1.0.

npm install drizzle-sybase
INSTALL
IMPORT
SIG · DRIZZLE-SYBASE
D
drizzle-sybase
databasejavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

drizzle
import { drizzle } from 'drizzle-sybase'
const { drizzle } = require('drizzle-sybase')
ESM-only; CommonJS require will fail because the package is type:module.
SybaseClient
import { SybaseClient } from 'drizzle-sybase'
Named export for creating the client instance. Not a default export.
DrizzleConfig
import type { DrizzleConfig } from 'drizzle-sybase'
import { DrizzleConfig } from 'drizzle-sybase'
DrizzleConfig is a TypeScript type, not a runtime value. Use 'import type' to avoid tree-shaking issues.

Connects to Sybase ASE via Drizzle ORM, runs a query, and logs the result.

import { drizzle } from 'drizzle-sybase'; import { SybaseClient } from 'drizzle-sybase'; const client = new SybaseClient({ host: process.env.SYBASE_HOST ?? 'localhost', port: Number(process.env.SYBASE_PORT ?? 5000), database: process.env.SYBASE_DB ?? 'mydb', user: process.env.SYBASE_USER ?? 'sa', password: process.env.SYBASE_PASSWORD ?? '', }); const db = drizzle(client); async function main() { const result = await db.execute('SELECT 1 AS value'); console.log(result.rows); } main().catch(console.error).finally(() => client.end());
Debug
Known issues
breakingNode.js >=24 is required. Older versions will fail with a syntax error or missing API.
fix
Upgrade Node.js to 24 or later.
affects: <24
breakingThe package uses ESM exclusively. CommonJS require() will throw ERR_REQUIRE_ESM.
fix
Use import syntax or switch to a dynamic import() call.
affects: >=1.0
deprecatedThe 'SybaseClient' constructor options object has partial type narrowing; some properties may be marked optional incorrectly. This will be fixed in a future release.
fix
Provide all essential fields (host, port, database, user, password) even if types say optional.
affects: <=1.1.0
gotchaFreeTDS must be installed on the system or prebuilt binaries must be available. Otherwise, installation will fail during native compilation.
fix
Install FreeTDS via system package manager (apt, brew) or use --build-from-source with @napi-rs/cli.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'drizzle-sybase'
Package not installed or incorrect import path (e.g., using require instead of import).
fix
Run 'npm install drizzle-sybase drizzle-orm' and ensure you use import syntax (e.g., import { drizzle } from 'drizzle-sybase').
TypeError: client.end is not a function
SybaseClient instance not correctly initialized or connection already closed.
fix
Call client.end() only after you have used the client. Ensure client is created with new SybaseClient(config). Consider using try-finally block.
Error: self-signed certificate in certificate chain
Sybase server uses a self-signed SSL certificate, and the client does not trust it by default.
fix
Set rejectUnauthorized: false in the client config (not recommended for production) or provide the correct CA certificate via ca option.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
drizzle-ormrequiredPeer dependency required to use Drizzle's query builder and schema definitions.
@napi-rs/clioptionalRequired to compile the native FreeTDS bindings during installation if prebuilt binaries are unavailable.
Agent activity
7 hits · last 30 days
node
6
Resources
drizzle-sybase — npm install drizzle-sybase · libregistry