MCPcopy Create free account
hub / github.com/subquery/subql / createColumnQuery

Function createColumnQuery

packages/node-core/src/db/sync-helper.ts:711–712  ·  view source on GitHub ↗
(schema: string, table: string, columnName: string, attributes: string)

Source from the content-addressed store, hash-verified

709 `ALTER TABLE "${schema}"."${modelToTableName(tableName)}" DROP COLUMN IF EXISTS ${columnName};`;
710
711export const createColumnQuery = (schema: string, table: string, columnName: string, attributes: string): string =>
712 `ALTER TABLE ${escapedName(schema, table)} ADD COLUMN IF NOT EXISTS "${columnName}" ${attributes};`;
713
714// fullTextSearch
715const TS_VECTOR_COL = '_tsv';

Callers 1

Calls 1

escapedNameFunction · 0.85

Tested by

no test coverage detected