Jim Drannbauer home resume

Introducing FastLegS, a PostgreSQL ORM for node.js

09 Mar 2011

Thad Clay (thadclay), Robert Malko (malkomalko), and I (excellentdrums) are proud to announce FastLegS. It’s an Object Relational Mapper (ORM) for PostgreSQL and node.js that uses the most excellent node-postgres by Brian Carlson (brianc).

Check it (from the README, as of 3/9/2011):

var FastLegS = require('FastLegS');

var connectionParams = {
  user: 'shes'
, password: 'got'
, database: 'legs'
, host: 'localhost'
, port: 5432
}

FastLegS.connect(connectionParams);

var Post = FastLegS.Base.extend({
  tableName: 'posts',
  primaryKey: 'id'
});

Post.create({ title: 'Some Title 1', body: 'Some body 1' }, function(err, results) {
  Post.find({ 'title.ilike': '%title%' }, { only: ['id', 'body'] }, function(err, post) {
    // Hooray!
  });
});

Let us know how we’re doing. We know it’s not done.

blog comments powered by Disqus