Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/database/postgres/schema/util.ts
1503 views
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