Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wetland

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wetland

An enterprise grade ORM for Node.js.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-96.23%
Maintainers
1
Weekly downloads
 
Created
Source

Wetland

Wetland is an enterprise grade object-relational mapper (ORM) for node.js.

Note: This module is under active development. While it's usable and well tested, it's not done yet. Some key features are still missing.

Features

The following is a list of the biggest features this ORM provides. For more detailed information, you can look at the tests until the documentation has been written.

  • Unit of work
  • Transactions
  • Entity manager
  • Repositories
  • QueryBuilder
  • Mapping
  • MetaData
  • Entity proxy
  • Criteria parser
  • More...

Installation

To install wetland simply run the following command:

npm i --save wetland

If you're using typescript, the typings are supplied by default. No additional typings have to be installed.

Usage

Usage will be documented soon. To give you an idea, here's an implementation example:

Vanilla

const Wetland = require('wetland').Wetland;
const Foo     = require('./entity/foo').Foo;
const Bar     = require('./entity/foo').Bar;
const wetland = new Wetland({
  stores: {
    simple: {
      client    : 'mysql',
      connection: {
        user    : 'root',
        database: 'testdatabase'
      }
    }
  },
  entities: [Foo, Bar]
});

// Get a manager scope. Call this method for every context (e.g. requests).
let manager = wetland.getManager();

// Get the repository for Foo
let repository = manager.getRepository(Foo);

repository.find({name: 'cake'}).then(results => {
  // ...
});

Babel / Typescript

import {Wetland} from 'wetland';
import {Foo} from './entity/Foo';
import {Bar} from './entity/Bar';

const wetland = new Wetland({
  stores: {
    simple: {
      client    : 'mysql',
      connection: {
        user    : 'root',
        database: 'testdatabase'
      }
    }
  },
  entities: [Foo, Bar]
});

// Get a manager scope. Call this method for every context (e.g. requests).
let manager = wetland.getManager();

// Get the repository for Foo
let repository = manager.getRepository(Foo);

repository.find({name: 'cake'}).then(results => {
  // ...
});

FAQs

Package last updated on 06 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc