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

Function modelToTableName

packages/node-core/src/db/sequelizeUtil.ts:19–22  ·  view source on GitHub ↗
(modelName: string)

Source from the content-addressed store, hash-verified

17
18// This method is simplified from https://github.com/sequelize/sequelize/blob/066421c00aad61694dcdbb624d4b73dbac7c7b42/packages/core/src/model-definition.ts#L245
19export function modelToTableName(modelName: string): string {
20 // Align underscored = true, same as in storeService sequelizeModel
21 return Utils.underscoredIf(Utils.pluralize(modelName), true);
22}
23
24export function formatColumnName(columnName: string): string {
25 return Utils.underscoredIf(columnName, true);

Callers 9

updateIndexesNameFunction · 0.90
dropColumnQueryFunction · 0.90
dropTableMethod · 0.90
createColumnMethod · 0.90
dropColumnMethod · 0.90
createIndexMethod · 0.90
dropRelationMethod · 0.90
createFullTextMethod · 0.90
dropFullTextMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected