@brimdata/zealot
Version:
The Javascript Client for Zed Lakes
66 lines (65 loc) • 3.02 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getPrimitives: ()=>getPrimitives,
isPrimitiveType: ()=>isPrimitiveType
});
const _typeBool = require("./type-bool");
const _typeBstring = require("./type-bstring");
const _typeBytes = require("./type-bytes");
const _typeDuration = require("./type-duration");
const _typeFloat16 = require("./type-float16");
const _typeFloat32 = require("./type-float32");
const _typeFloat64 = require("./type-float64");
const _typeInt16 = require("./type-int16");
const _typeInt32 = require("./type-int32");
const _typeInt64 = require("./type-int64");
const _typeInt8 = require("./type-int8");
const _typeIp = require("./type-ip");
const _typeNet = require("./type-net");
const _typeNull = require("./type-null");
const _typeString = require("./type-string");
const _typeTime = require("./type-time");
const _typeType = require("./type-type");
const _typeTypename = require("./type-typename");
const _typeUint16 = require("./type-uint16");
const _typeUint32 = require("./type-uint32");
const _typeUint64 = require("./type-uint64");
const _typeUint8 = require("./type-uint8");
const getPrimitives = ()=>{
return {
string: _typeString.TypeString,
bstring: _typeBstring.TypeBString,
time: _typeTime.TypeTime,
ip: _typeIp.TypeIp,
uint16: _typeUint16.TypeUint16,
uint8: _typeUint8.TypeUint8,
duration: _typeDuration.TypeDuration,
uint64: _typeUint64.TypeUint64,
uint32: _typeUint32.TypeUint32,
int64: _typeInt64.TypeInt64,
int8: _typeInt8.TypeInt8,
int16: _typeInt16.TypeInt16,
null: _typeNull.TypeNull,
typename: _typeTypename.TypeTypename,
net: _typeNet.TypeNet,
float64: _typeFloat64.TypeFloat64,
float32: _typeFloat32.TypeFloat32,
float16: _typeFloat16.TypeFloat16,
int32: _typeInt32.TypeInt32,
bool: _typeBool.TypeBool,
bytes: _typeBytes.TypeBytes,
type: _typeType.TypeType
};
};
function isPrimitiveType(value) {
return value === _typeString.TypeString || value === _typeBstring.TypeBString || value === _typeTime.TypeTime || value === _typeIp.TypeIp || value === _typeUint16.TypeUint16 || value === _typeUint8.TypeUint8 || value === _typeDuration.TypeDuration || value === _typeUint64.TypeUint64 || value === _typeUint32.TypeUint32 || value === _typeInt64.TypeInt64 || value === _typeInt8.TypeInt8 || value === _typeInt16.TypeInt16 || value === _typeNull.TypeNull || value === _typeTypename.TypeTypename || value === _typeNet.TypeNet || value === _typeFloat64.TypeFloat64 || value === _typeFloat32.TypeFloat32 || value === _typeFloat16.TypeFloat16 || value === _typeInt32.TypeInt32 || value === _typeBool.TypeBool || value === _typeBytes.TypeBytes || value === _typeType.TypeType;
}