Skip to content

📝 Remove @plotdb references from docs and package name #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

## 4.0.0

- upgrade `pg` from 7.4.1 to 8.5.1 to prevent silent failure for node v14 or later, reported in [this issue](https://github.com/brianc/node-postgres/issues/2317).
- upgrade `pg` from 7.4.1 to 8.5.1 to prevent silent failure for node v14 or later, reported in [this issue](https://github.com/brianc/node-postgres/issues/2317).
- fix submit ops failed due to version mismatched - https://github.com/share/sharedb-postgres/issues/8

## Note about re-versioning

Original `sharedb-postgres` seems to have been not maintained for a long time since 2018. Thus we made a fork and maintain it as `@plotdb/sharedb-postgre`.


# Change log in original repo

Expand Down
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @plotdb/sharedb-postgres
# sharedb-postgres

PostgreSQL database adapter for [sharedb](https://github.com/share/sharedb). This driver can be used both as a snapshot store and oplog.

Expand All @@ -7,15 +7,11 @@ Doesn't support queries (yet?).
Moderately experimental. (This drives [Synaptograph](https://www.synaptograph.com)'s backend, and [@nornagon](https://github.com/nornagon) hasn't noticed any issues so far.)


## Note about versioning

This is a fork from the [original `sharedb-postgres`](https://github.com/share/sharedb-postgres) and its relative forks (see [billwashere](https://github.com/billwashere/sharedb-postgres-jsonb), [zbryikt](https://github.com/zbryikt/sharedb-postgres-jsonb). It seems to have been not maintained for a long time since 2018, Thus we decide to fork it and maintain it as `@plotdb/sharedb-postgre`.


## Installation
## Installation

```cmd
npm i @plotdb/sharedb-postgres
npm i sharedb-postgres
```


Expand All @@ -25,7 +21,7 @@ Due to the fix to resolve [high concurency issues](https://github.com/share/shar

## Migrating older versions

Older versions of this adaptor used the data type json. You will need to alter the data type prior to using if you are upgrading.
Older versions of this adaptor used the data type json. You will need to alter the data type prior to using if you are upgrading.

```PLpgSQL
ALTER TABLE ops
Expand All @@ -44,16 +40,16 @@ ALTER TABLE snapshots
`sharedb-postgres-jsonb` wraps native [node-postgres](https://github.com/brianc/node-postgres), and it supports the same configuration options.

To instantiate a sharedb-postgres wrapper, invoke the module and pass in your
PostgreSQL configuration as an argument or use environmental arguments.
PostgreSQL configuration as an argument or use environmental arguments.

For example using environmental arugments:

```js
var db = require('@plotdb/sharedb-postgres')();
var db = require('sharedb-postgres')();
var backend = require('sharedb')({db: db})
```

Then executing via the command line
Then executing via the command line

```
PGUSER=dbuser PGPASSWORD=secretpassword PGHOST=database.server.com PGDATABASE=mydb PGPORT=5433 npm start
Expand All @@ -62,7 +58,7 @@ PGUSER=dbuser PGPASSWORD=secretpassword PGHOST=database.server.com PGDATABASE=m
Example using an object

```js
var db = require('@plotdb/sharedb-postgres')({host: 'localhost', database: 'mydb'});
var db = require('sharedb-postgres')({host: 'localhost', database: 'mydb'});
var backend = require('sharedb')({db: db})
```

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@plotdb/sharedb-postgres",
"name": "sharedb-postgres",
"version": "4.0.1",
"description": "PostgreSQL adapter for ShareDB. forked from share/sharedb-postgres",
"main": "index.js",
Expand All @@ -16,7 +16,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/plotdb/sharedb-postgres"
"url": "https://github.com/share/sharedb-postgres"
},
"dependencies": {
"pg": "^8.5.1",
Expand Down