Sha256: 71fb8a4c40f207f70782a2c7cd9da8271385cf7f47c913e1f93baa04dee9b3f7

Contents?: true

Size: 1.87 KB

Versions: 18

Compression:

Stored size: 1.87 KB

Contents

!(angular => {
  'use strict';

  let filters = {
    tableRestrictionMet(item, filterArgs) {
      return ((filterArgs.tableRestrict.length === 0) ||  _.contains(filterArgs.tableRestrict, item.table));
    },
    schemaRestrictionMet(item, filterArgs) {
      return ((filterArgs.schemaRestrict.length === 0) || _.contains(filterArgs.schemaRestrict, item.schema));
    }
  };

  angular
    .module('aleph.schemaCompleterConfig', [])

    .constant('SCHEMA_MATCHERS', [
        {
          nameProperty: 'schema',
          meta: 'schema',
          contextRelevance: {
            from: 1000
          }
        },
        {
          nameProperty: 'column',
          meta: 'column',
          contextRelevance: {
            select: 1000,
            from: 500,
            where: 1000
          },
          contextItemFilters: {
            select: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ],
            from: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ],
            where: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ]
          }
        },
        {
          nameProperty: 'table',
          meta: 'table',
          contextRelevance: {
            select: 500,
            from: 1000,
            where: 500,
            postDot: 2000
          },
          contextItemFilters: {
            select: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ],
            from: [
              filters.schemaRestrictionMet
            ],
            postDot: [
              filters.schemaRestrictionMet
            ],
            where: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ]
          }
        }
      ]);

}(angular));

Version data entries

18 entries across 9 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.4.9.pre.dev public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.4.8 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.4.8 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.4.7 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.4.7 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.4.4 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.4.4 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.4.2 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.4.2 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.4.1 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.4.1 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.3.0 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.3.0 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.2.0 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.2.0 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.1.0 public/assets/angular/config/schema_completer_config.js-bf6c4caf7972760623f4faa48864aef0.es6
aleph_analytics-0.1.0 app/assets/javascripts/angular/config/schema_completer_config.js.es6