Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 39539
1
###
2
PostgreSQL database entry point.
3
4
COPYRIGHT : (c) 2017 SageMath, Inc.
5
LICENSE : AGPLv3
6
###
7
require('coffee-cache')
8
9
fs = require('fs')
10
11
base = require('./postgres-base')
12
for f in ['pg_type', 'expire_time', 'one_result', 'all_results', 'count_result']
13
exports[f] = base[f]
14
15
exports.PUBLIC_PROJECT_COLUMNS = ['project_id', 'last_edited', 'title', 'description', 'deleted', 'created']
16
exports.PROJECT_COLUMNS = ['users'].concat(exports.PUBLIC_PROJECT_COLUMNS)
17
18
19
# Add further functionality to PostgreSQL class -- must be at the bottom of this file.
20
# Each of the following calls extends the PostgreSQL class with further important functionality.
21
# Order matters.
22
for module in ['base', 'server-queries', 'blobs', 'synctable', 'user-queries', 'ops']
23
exports.PostgreSQL = require("./postgres-#{module}").PostgreSQL
24
25
exports.db = (opts) ->
26
return new exports.PostgreSQL(opts)
27
28
29
30