MCPcopy
hub / github.com/sequelize/sequelize / _getJsonCast

Method _getJsonCast

src/dialects/abstract/query-generator.js:2716–2727  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2714 }
2715
2716 _getJsonCast(value) {
2717 if (typeof value === 'number') {
2718 return 'double precision';
2719 }
2720 if (value instanceof Date) {
2721 return 'timestamptz';
2722 }
2723 if (typeof value === 'boolean') {
2724 return 'boolean';
2725 }
2726 return;
2727 }
2728
2729 _validateCastType(cast) {
2730 if (!ALLOWED_CAST_TYPES.has(cast.toLowerCase())) {

Callers 1

_castKeyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected