A Marty-like data source for PostgreSQL. Version 0.7.0 is the latest stable release. Provides a base DataSource class that wraps pg-promise with query building, connection management, and helper methods for insert/update. Integrates with Immutable.js models and automatic camelCase/snake_case conversion. Lightweight alternative to ORMs like Sequelize or Objection for projects already using Marty.js or Flux patterns with Immutable data.
npm install great-scottNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Extends DataSource to define a User model with Immutable.js Record, query builder select, and insert/update helpers.
Define models using Immutable.js Record, e.g., const MyModel = Record({...}).Pin to exact version and expect breaking changes in future 0.x releases.
Always provide tableName when calling insert() or update().
Implement parse() and format() in your subclass to handle data transformation.
Install underscore (or lodash) and import it, or implement your own conversion functions.
Ensure model is defined as a Record, e.g., const Model = Record({...});Install immutable: npm install immutable
Use this.builder only in instance methods, not static methods like findAll.
Pass tableName in super({tableName: 'your_table', ...}).