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

Method _castKey

lib/dialects/abstract/query-generator.js:2528–2535  ·  view source on GitHub ↗
(key, value, cast, json)

Source from the content-addressed store, hash-verified

2526 }
2527
2528 _castKey(key, value, cast, json) {
2529 cast = cast || this._getJsonCast(Array.isArray(value) ? value[0] : value);
2530 if (cast) {
2531 return new Utils.Literal(this.handleSequelizeMethod(new Utils.Cast(new Utils.Literal(key), cast, json)));
2532 }
2533
2534 return new Utils.Literal(key);
2535 }
2536
2537 _getJsonCast(value) {
2538 if (typeof value === 'number') {

Callers 1

_traverseJSONMethod · 0.95

Calls 2

_getJsonCastMethod · 0.95
handleSequelizeMethodMethod · 0.95

Tested by

no test coverage detected