1.0.3-alpha.3 • Published 10 months ago

@nuvix/database v1.0.3-alpha.3

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
10 months ago

Nuvix Database Library

A powerful and modern TypeScript database library inspired by cutting-edge technologies and best practices.

Features

  • TypeScript-first approach with full type safety
  • Adapter-based design supporting multiple database backends
  • Document-oriented API with flexible querying capabilities
  • Built-in caching for improved performance
  • Comprehensive permission system
  • Transaction support

Installation

npm install @nuvix/database

Usage

import { Database } from "@nuvix/database";
import { PostgreDB } from "@nuvix/database/src/adapter/postgre";
import { Cache, Redis } from "@nuvix/cache";

// Create a database adapter
const adapter = new PostgreDB({
    connection: {
        connectionString: "postgres://user:password@localhost:5432/mydb",
        ssl: {
            rejectUnauthorized: false,
        },
    },
    schema: "public",
});

// Initialize the adapter
adapter.init();

// Create a cache instance
const cache = new Cache(new Redis({}));

// Create the database instance
const db = new Database(adapter, cache, {
    logger: true,
});

// Now you can use the database

Testing

This library includes comprehensive tests for both core functionality and specific adapter implementations.

Running Tests

# Run core tests only
npm run test

# Run PostgreSQL adapter tests
npm run test:pg

# Run all tests
npm run test:all

# Run tests with specific pattern
npm run test -- --testPathPattern=your-pattern

Test Configuration

Configure test settings by setting environment variables:

# Enable PostgreSQL tests
PG_TEST_CONNECTION=true npm run test:pg

License

BSD-3-Clause

1.0.3-alpha.3

10 months ago

1.0.3-alpha.2

10 months ago

1.0.3

10 months ago

1.0.2-alpha.3

12 months ago

1.0.2-alpha.2

12 months ago

1.0.2-alpha.1

1 year ago

1.0.2

1 year ago

1.0.1-alpha.4

1 year ago

1.0.1-alpha.3

1 year ago

1.0.1-alpha.2

1 year ago

1.0.1-alpha.1

1 year ago

1.0.1-alpha.0

1 year ago

1.0.0

1 year ago

0.0.9

1 year ago

0.0.8-alpha.5

1 year ago

0.0.8-alpha.1

1 year ago

0.0.8

1 year ago

0.0.7-alpha.3

1 year ago

0.0.7-alpha.2

1 year ago

0.0.7-alpha.1

1 year ago

0.0.6-alpha.7

1 year ago

0.0.6-alpha.6

1 year ago

0.0.6-alpha.5

1 year ago

0.0.6-alpha.3

1 year ago

0.0.6-alpha.2

1 year ago

0.0.6-alpha.1

1 year ago

0.0.6

1 year ago

0.0.5-alpha.2

1 year ago

0.0.5-alpha.1

1 year ago

0.0.5

1 year ago

0.0.4-alpha.3

1 year ago

0.0.4-alpha.2

1 year ago

0.0.4-alpha.1

1 year ago

0.0.3-alpha.3

1 year ago

0.0.3-alpha.2

1 year ago

0.0.3-alpha.1

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago