src/Metadata/EntitySchemaTransformer.js
/**
     * Process indices and uniques in schema.
     *
     * @param {MetadataArgsStorage} metadataArgsStorage
     * @param {EntitySchema} entitySchema
     *
     * @private
     */
Process indices and uniques in schema.

@private
Process indices and uniques in schema . @private
_processIndices(metadataArgsStorage, entitySchema) {
        const options = entitySchema.options;
        for (const index of options.indices || []) {
            const indexArgs = {
                target: options.target || options.name,
                name: index.name,
                unique: true === index.unique,
                spatial: true === index.spatial,
                fulltext: true === index.fulltext,
                synchronize: false !== index.synchronize,
                where: index.where,
                sparse: index.sparse,
                columns: index.columns,
            };
            metadataArgsStorage.indices.push(indexArgs);
        }
        for (const unique of options.uniques || []) {
            const uniqueArgs = {
                target: options.target || options.name,
                name: unique.name,
                columns: unique.columns,
            };
            metadataArgsStorage.uniques.push(uniqueArgs);
        }
    }
_processIndices ( metadataArgsStorage , entitySchema ) { const options = entitySchema . options ; for ( const index of options . indices || [ ] ) { const indexArgs = { target : options . target || options . name , name : index . name , unique : true === index . unique , spatial : true === index . spatial , fulltext : true === index . fulltext , synchronize : false !== index . synchronize , where : index . where , sparse : index . sparse , columns : index . columns , } ; metadataArgsStorage . indices . push ( indexArgs ) ; } for ( const unique of options . uniques || [ ] ) { const uniqueArgs = { target : options . target || options . name , name : unique . name , columns : unique . columns , } ; metadataArgsStorage . uniques . push ( uniqueArgs ) ; } }
Process indices and uniques in schema.
Process indices and uniques in schema .