MCPcopy
hub / github.com/sequelize/sequelize / _castKey

Method _castKey

src/dialects/abstract/query-generator.js:2707–2714  ·  view source on GitHub ↗
(key, value, cast, json)

Source from the content-addressed store, hash-verified

2705 }
2706
2707 _castKey(key, value, cast, json) {
2708 cast = cast || this._getJsonCast(Array.isArray(value) ? value[0] : value);
2709 if (cast) {
2710 return new Utils.Literal(this.handleSequelizeMethod(new Utils.Cast(new Utils.Literal(key), cast, json)));
2711 }
2712
2713 return new Utils.Literal(key);
2714 }
2715
2716 _getJsonCast(value) {
2717 if (typeof value === 'number') {

Callers 1

_traverseJSONMethod · 0.95

Calls 2

_getJsonCastMethod · 0.95
handleSequelizeMethodMethod · 0.95

Tested by

no test coverage detected