CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/database/postgres/schema/util.ts
Views: 687
1
// Certain field aren't allowed without quoting in Postgres.
2
// Also case sensitivity can be messed up by not quoting. So
3
// we use this to quote.
4
export function quoteField(field: string): string {
5
if (field[0] === '"') {
6
// already quoted
7
return field;
8
}
9
return `"${field}"`;
10
}
11
12