PostgreSQL adapter for JugglingDB
Clone or download
Pull request Compare This branch is 10 commits ahead, 27 commits behind jugglingdb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This repo has been successfully merged into the official postgres-adapter repo. Use that =)

This fork includes the following features:

  1. Support for float datatypes, ala the mysql adapter. Just add dataType: 'double' to your column properties:
var Model = schema.define('Model', {
  realNumber: {type: Number, dataType: 'double'}
  1. Support for single and multi-column indexes, ala the mysql adapter. Single column indexes are specified by adding index: true to the column properties. Unique single-column indexes are created by adding unique: true to the column properties (it is unnecessary to also specify index: true since it is implied). Multi-column indexes are added by specifying indexes in the settings hash of the schema.define method. Single-column indexes may also be specified this way if you want to have a little more control over their options. Each key in the indexes hash is the name of the index, and the value is a hash which specifies the index properties:
var Model = schema.define('Model', {
  column1: {type: Number, index: true},
  column2: {type: Number}
}, {
  indexes: {
    indexName1: {
      columns: 'column1, column2',
      type: 'btree'

The full list of supported index properties are:

  columns: 'comma, delimited, list, of, columns',
  keys: ['array', 'of', 'columns'],   // takes precedence over "columns"!
  type: 'TYPE',                       // 'btree', 'hash', etc
  kind: 'KIND'                        // 'unique' is the only valid option

See the postgres documentation for more information about type and kind.