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.9.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Wetland

Build Status npm version Dependency Status Gitter chat

Wetland is a modern, and enterprise grade object-relational mapper (ORM) for node.js. It allows you to get started quickly, without losing flexibility or features.

Features

Some of the major features provided include:

  • Unit of work
  • Migrations
  • Transactions
  • Entity manager
  • Cascaded persists
  • Deep joins
  • Repositories
  • QueryBuilder
  • Entity mapping
  • Optimized state manager
  • Recipe based hydration
  • More...

Installation

To install wetland run the following command:

npm i --save wetland

Typings are provided by default for TypeScript users. No additional typings need installing.

Compatibility

  • All operating systems
  • Node.js 6.0+

Usage

The following is a snippet to give you an idea what it's like to work with wetland. For a much more detailed explanation, head to the documention..

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]
});

// Create the tables. Async process, only here as example.
// use .getSQL() (not async) in stead of apply (async) to get the queries.
let migrator = wetland.getMigrator().create();
migrator.apply().then(() => {});

// 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);

// Get some results, and join.
repository.find({name: 'cake'}, {joins: ['candles', 'baker', 'baker.address']})
  .then(results => {
    // ...
  });

Keywords

FAQs

Package last updated on 20 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