ampersand-sync-pg
Sync Ampserand objects to Postgres DB
Last updated 4 years ago by morganrallen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ampersand-sync-pg 
SYNC missed versions from official npm registry.

ampersand-sync-pg

Sync Ampersand data to Postgres database

install

npm install --save ampersand-sync-pg

usage

creating model

  var pgSync = require("ampersand-sync-pg");

  var Person = AmpersandModel.extend({
    props: {
      name: "string",
      occupation: "string"
    },

    tableName: "users",
    sync: pgSync({
      database: "ampsync",
      idleTimeoutMillis: 1,
      user: "root",
      password: "greatpassword"
    })
  });

  var fry = new Person({
    name: "Philip J. Fry",
    occupation: "Delivery Boy"
  });

  fry.save();

Other Ampersand sync methods should work as expected.

Current Tags

  • 1.0.2                                ...           latest (4 years ago)

2 Versions

  • 1.0.2                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |