Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/database/README.md
Views: 687
@cocalc/database
This package connects the hub and nextjs servers to the PostgreSQL database, and implements some nontrivial functionality to support these servers. In particular:
It implements changefeeds and user queries, which provides a pure JSON language similar to the basics of GraphQL for setting, getting, and subscribing to data in the database. This uses PostgreSQL LISTEN/NOTIFY to send push notifications about changes to tables. It's specifically designed for our data structures, of course, and is not generic. The data structures are currently defined in
@cocalc/util/db-schema
.
Notes
WARNING: This is the single scariest chunk of CoffeeScript left in CoCalc!