ZTeraDB Node.js Client Driver
Welcome!
This documentation will walk you through ZTeraDB step-by-step, using simple language and practical examples.
๐ What Is ZTeraDB?
ZTeraDB helps you connect to your existing databases (PostgreSQL, MySQL, MSSQL, etc.) through a single unified platform.
You write one query language (ZQL) instead of different SQL dialects.
๐ง Architecture (Simple Explanation)
Your App โ ZTeraDB Node Client โ ZTeraDB Server โ Your Databases
You never connect to the database directly.
ZTeraDB does that for you.
โญ Features
- ๐ Unified Query Language (ZQL)
- ๐ Easy integration with any Node.js app
- ๐งต Async/await support
- โ๏ธ Auto-managed connections
- ๐ Secure key-based authentication
- ๐ฏ Clean query builder (insert, select, update, delete)
- ๐งฎ Advanced math and logical filters
- ๐ Beginner-friendly workflows
๐ Requirements
- Node.js 18.20.7+
- Basic JavaScript knowledge
- ZTeraDB account (for clientKeys)
๐ฆ Install
npm install zteradb
Or Yarn:
yarn add zteradb
๐ Quick Start (Hello World)
import { ZTeraDBConnect, ZTeraDBQuery } from "zteradb";
const config = JSON.parse(process.env.ZTERADB_CONFIG);
const db = ZTeraDBConnect(config, "db1.zteradb.com", 7777);
const query = new ZTeraDBQuery("user").select();
const users = await db.run(query);
for await (const row of users) {
console.log(row);
}
db.close();
๐ Documentation Sections
- Configuration
- Connection
- Query Builder
- Filter Conditions
- Examples
- Troubleshooting Guide
- Quickstart Guide
- License