gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
118 lines (117 loc) • 4.17 kB
TypeScript
/**
* Copyright 2013-2026 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export declare const CommonDBTypes: {
readonly STRING: "String";
readonly INTEGER: "Integer";
readonly LONG: "Long";
readonly BIG_DECIMAL: "BigDecimal";
readonly FLOAT: "Float";
readonly DOUBLE: "Double";
readonly UUID: "UUID";
readonly ENUM: "Enum";
readonly BOOLEAN: "Boolean";
readonly LOCAL_DATE: "LocalDate";
readonly ZONED_DATE_TIME: "ZonedDateTime";
readonly BLOB: "Blob";
readonly ANY_BLOB: "AnyBlob";
readonly IMAGE_BLOB: "ImageBlob";
readonly TEXT_BLOB: "TextBlob";
readonly INSTANT: "Instant";
readonly DURATION: "Duration";
readonly BYTES: "byte[]";
readonly BYTE_BUFFER: "ByteBuffer";
readonly LOCAL_TIME: "LocalTime";
};
export declare const RelationalOnlyDBTypes: {
readonly BYTES: "byte[]";
readonly BYTE_BUFFER: "ByteBuffer";
};
export declare const BlobTypes: {
readonly IMAGE: "image";
readonly ANY: "any";
readonly TEXT: "text";
};
declare const _default: {
CommonDBTypes: {
readonly STRING: "String";
readonly INTEGER: "Integer";
readonly LONG: "Long";
readonly BIG_DECIMAL: "BigDecimal";
readonly FLOAT: "Float";
readonly DOUBLE: "Double";
readonly UUID: "UUID";
readonly ENUM: "Enum";
readonly BOOLEAN: "Boolean";
readonly LOCAL_DATE: "LocalDate";
readonly ZONED_DATE_TIME: "ZonedDateTime";
readonly BLOB: "Blob";
readonly ANY_BLOB: "AnyBlob";
readonly IMAGE_BLOB: "ImageBlob";
readonly TEXT_BLOB: "TextBlob";
readonly INSTANT: "Instant";
readonly DURATION: "Duration";
readonly BYTES: "byte[]";
readonly BYTE_BUFFER: "ByteBuffer";
readonly LOCAL_TIME: "LocalTime";
};
RelationalOnlyDBTypes: {
readonly BYTES: "byte[]";
readonly BYTE_BUFFER: "ByteBuffer";
};
isCommonDBType: typeof isCommonDBType;
hasValidation: typeof hasValidation;
BlobTypes: {
readonly IMAGE: "image";
readonly ANY: "any";
readonly TEXT: "text";
};
};
export default _default;
export declare function isCommonDBType(type: string): boolean;
export declare function hasValidation(type: string, validation: string, isAnEnum?: boolean): boolean;
export declare const blobFieldTypesValues: {
readonly BLOB: "Blob";
readonly ANY_BLOB: "AnyBlob";
readonly IMAGE_BLOB: "ImageBlob";
readonly TEXT_BLOB: "TextBlob";
};
export declare const fieldTypesValues: {
readonly BLOB: "Blob";
readonly ANY_BLOB: "AnyBlob";
readonly IMAGE_BLOB: "ImageBlob";
readonly TEXT_BLOB: "TextBlob";
readonly STRING: "String";
readonly INTEGER: "Integer";
readonly LONG: "Long";
readonly BIG_DECIMAL: "BigDecimal";
readonly FLOAT: "Float";
readonly DOUBLE: "Double";
readonly UUID: "UUID";
readonly BOOLEAN: "Boolean";
readonly LOCAL_DATE: "LocalDate";
readonly ZONED_DATE_TIME: "ZonedDateTime";
readonly INSTANT: "Instant";
readonly DURATION: "Duration";
readonly TIME: "LocalTime";
readonly BYTES: "byte[]";
readonly BYTE_BUFFER: "ByteBuffer";
};
export type FieldType = (typeof fieldTypesValues)[keyof typeof fieldTypesValues];
export type FieldBlobType = (typeof blobFieldTypesValues)[keyof typeof blobFieldTypesValues];
export type FieldBinaryType = (typeof blobFieldTypesValues)[keyof typeof blobFieldTypesValues] | 'byte[]';