artmapper
Version:
Spring Boot clone for Node.js with TypeScript/JavaScript - JPA-like ORM, Lombok decorators, dependency injection, and MySQL support
75 lines • 3.08 kB
TypeScript
import 'reflect-metadata';
export declare const JOIN_COLUMN_METADATA_KEY: unique symbol;
export declare const JOIN_TABLE_METADATA_KEY: unique symbol;
export declare const JOIN_COLUMNS_METADATA_KEY: unique symbol;
export declare const INVERSE_JOIN_COLUMNS_METADATA_KEY: unique symbol;
export interface JoinColumnOptions {
name?: string;
referencedColumnName?: string;
nullable?: boolean;
unique?: boolean;
insertable?: boolean;
updatable?: boolean;
columnDefinition?: string;
}
export interface JoinTableOptions {
name?: string;
catalog?: string;
schema?: string;
joinColumns?: JoinColumnOptions[];
inverseJoinColumns?: JoinColumnOptions[];
}
/**
* Spring JPA @JoinColumn equivalent
* Specifies a column for joining an entity association or element collection
*/
export declare function JoinColumn(options?: JoinColumnOptions): (target: any, propertyKey: string) => void;
/**
* Spring JPA @JoinColumns equivalent
* Groups multiple JoinColumn annotations
*/
export declare function JoinColumns(...columns: JoinColumnOptions[]): (target: any, propertyKey: string) => void;
/**
* Spring JPA @JoinTable equivalent
* Specifies the mapping of associations
*/
export declare function JoinTable(options?: JoinTableOptions): (target: any, propertyKey: string) => void;
/**
* Spring JPA @MappedSuperclass equivalent
* Designates a class whose mapping information is applied to the entities that inherit from it
*/
export declare const MAPPED_SUPERCLASS_METADATA_KEY: unique symbol;
export declare function MappedSuperclass(): (target: Function) => void;
/**
* Spring JPA @Embedded equivalent
* Specifies a persistent field or property of an entity whose value is an instance of an embeddable class
*/
export declare const EMBEDDED_METADATA_KEY: unique symbol;
export declare function Embedded(): (target: any, propertyKey: string) => void;
/**
* Spring JPA @Embeddable equivalent
* Specifies a class whose instances are stored as an intrinsic part of an owning entity
*/
export declare const EMBEDDABLE_METADATA_KEY: unique symbol;
export declare function Embeddable(): (target: Function) => void;
/**
* Spring JPA @Transient equivalent
* Specifies that the property or field is not persistent
*/
export declare const TRANSIENT_METADATA_KEY: unique symbol;
export declare function Transient(): (target: any, propertyKey: string) => void;
/**
* Spring JPA @Enumerated equivalent
* Specifies that a persistent property or field should be persisted as an enumerated type
*/
export declare const ENUMERATED_METADATA_KEY: unique symbol;
export type EnumType = 'ORDINAL' | 'STRING';
export declare function Enumerated(value?: EnumType): (target: any, propertyKey: string) => void;
/**
* Spring JPA @Temporal equivalent
* Specifies the temporal type of a date field
*/
export declare const TEMPORAL_METADATA_KEY: unique symbol;
export type TemporalType = 'DATE' | 'TIME' | 'TIMESTAMP';
export declare function Temporal(value: TemporalType): (target: any, propertyKey: string) => void;
//# sourceMappingURL=mapping.d.ts.map