|
| 1 | +# sharedb-postgres |
| 2 | + |
| 3 | +PostgreSQL database adapter for [sharedb](https://github.com/share/sharedb). This |
| 4 | +driver can be used both as a snapshot store and oplog. |
| 5 | + |
| 6 | +Doesn't support queries yet. |
| 7 | + |
| 8 | +Highly experimental. |
| 9 | + |
| 10 | + |
| 11 | +## Usage |
| 12 | + |
| 13 | +`sharedb-postgres` wraps native [node-postgres](https://github.com/brianc/node-postgres), and it supports the same configuration options. |
| 14 | + |
| 15 | +To instantiate a sharedb-postgres wrapper, invoke the module and pass in your |
| 16 | +PostgreSQL configuration as an argument. For example: |
| 17 | + |
| 18 | + var db = require('sharedb-postgres')('postgres://localhost/mydb'); |
| 19 | + var backend = require('sharedb')({db: db}) |
| 20 | + |
| 21 | +## Error codes |
| 22 | + |
| 23 | +PostgreSQL errors are passed back directly. |
| 24 | + |
| 25 | +## MIT License |
| 26 | + |
| 27 | +Copyright (c) 2016 by Jeremy Apthorp |
| 28 | + |
| 29 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 30 | +of this software and associated documentation files (the "Software"), to deal |
| 31 | +in the Software without restriction, including without limitation the rights |
| 32 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 33 | +copies of the Software, and to permit persons to whom the Software is |
| 34 | +furnished to do so, subject to the following conditions: |
| 35 | + |
| 36 | +The above copyright notice and this permission notice shall be included in |
| 37 | +all copies or substantial portions of the Software. |
| 38 | + |
| 39 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 40 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 41 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 42 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 43 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 44 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 45 | +THE SOFTWARE. |
| 46 | + |
0 commit comments